07.01.2012, 18:22
Код:
format(Query, sizeof(Query), "SELECT `Parool` FROM `kasutajad` WHERE `Name` = '%s'",Nimi(playerid)); if(strlen(inputtext) == mysql_query(Query)) { SendClientMessage(playerid, -1, "right password"); LaadiKasutaja(playerid); return 1; } else { SendClientmessage(playerid, -1, "Wrong password"); }
Код:
stock Nimi(playerid) { new KasutajaNimi[MAX_PLAYER_NAME] ; if(IsPlayerConnected(playerid)) GetPlayerName(playerid, KasutajaNimi, sizeof(KasutajaNimi)); else KasutajaNimi = "Unknown"; return KasutajaNimi; }