18.02.2013, 02:20
Players can press enter and be logged in without typing in a password.
How can I fix this?
How can I fix this?
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(!response) return Kick(playerid);
if(response)
{
if(strcmp(inputtext,pInfo[playerid][Pass]) == 0)
{
INI_ParseFile(Path(playerid),"loadaccount_user",.bExtra = true, .extra = playerid);
SetPlayerFightingStyle(playerid,pInfo[playerid][Style]);
SpawnPlayer(playerid);
new str[10];
format(str,sizeof(str),"$%i",pInfo[playerid][Cash]);
PlayerTextDrawShow(playerid,Info[playerid]);
PlayerTextDrawSetString(playerid,Info[playerid],str);
}
else
{
ShowPlayerDialog(playerid,1,3,"Login","{FF6347}Incorrect password!\n{A9C4E4}Type in your password to login","Login","Cancel");
return 1;
}
}
}
return 1;
}