25.11.2013, 03:37
pawn Code:
public OnPlayerLogin(playerid,password[])
{
new tmp2[256]
new string2[64];
new string[128];
new playername2[MAX_PLAYER_NAME];
new playersip[24];
SetRealName(playerid);
GetPlayerName(playerid, playername2, sizeof(playername2));
GetPlayerIp(playerid, playersip, sizeof(playersip));
format(string2, sizeof(string2), "ERP/Users/%s.ini", playername2);
if (fexist(string2))
{
new password2 = num_hash(password);
if(INI_Int(string2,"Password") == password2)
{
PlayerInfo[playerid][pKey] = INI_Int(string2,"Password");
PlayerInfo[playerid][pLevel] = INI_Int(string2,"Level");
PlayerInfo[playerid][pSpawn] = INI_Int(string2,"Spawn");
}
else
{
gPlayerLogTries[playerid] += 1;
ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,"Try Again, please Log-In","You have entered an incorrect password\nType your password below to log-in","Log-in","Quit");
if(gPlayerLogTries[playerid] == 3) { Kick(playerid); }
}
}//missed this
return 1;// return value is supposed to be below the bracket above
}//and you missed this too