Jump to content

Question

Posted

Salut, am facut comanda /login + un mic system de admin

Deci cand ma loghez nu mi se incarca adminul, m`am uitat eu in account-ul meu sa vad daca chiar am.

CMD:login(playerid,params[])
{
	if (Logged[playerid]) return SendClientMessage(playerid, -1,"You have already logined.");
    if (!udb_Exists(PlayerName(playerid))) return SendClientMessage(playerid, -1,"You do not have an account, please /register [password]");
    if (strlen(params)==0) return SendClientMessage(playerid, -1,"USAGE: /login [password]");
    if (udb_CheckLogin(PlayerName(playerid),params))
	{
		SetPlayerScore(playerid,dUserINT(PlayerName(playerid)).("Score"));
		SetPlayerMoney(playerid,dUserINT(PlayerName(playerid)).("Moneys"));
		PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(playerid), "AdminLevel");
		Logged[playerid]=true;
		return SendClientMessage(playerid, -1,"You have successfully logined.");
    }
	return SendClientMessage(playerid, -1,"Wrong password or nickname!");
}

// Comanda Login

Nu imi recomandati ceva cu sscanf ca habar nu am :))

3 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.