05.01.2013, 16:24
I want Put in my login script 2 times warn then 3 time kicked from server if player put incorrect password.
there is my code
there is my code
Код:
case LOGIN_MENU: { new f[40], string[150]; format(f, sizeof(f), USER_FILE, GetName(playerid)); if(!strlen(inputtext)) return SendClientMessage(playerid, RED, "You MUST provide a password.") && Kick(playerid); else if(!response) return SendClientMessage(playerid, RED, "You MUST login before you can spawn.") && Kick(playerid); { new buf[129]; WP_Hash(buf, sizeof (buf), inputtext); if(strcmp(buf, PlayerInfo[playerid][pPass], false) != 0) { SendClientMessage(playerid, RED, "Incorrect password."); format(string, sizeof(string), "%s [%d] has been kicked from NVCNR - Reason: Incorrect password", GetName(playerid), playerid); SendClientMessage(playerid, RED, string); Kick(playerid); return 1; }