29.03.2010, 21:09
if(inputtext == AccountInfo[playerid][Password])
error 033: array must be indexed (variable "inputtext")
OR if its not possible:
Make that so it doesnt log you in if you type any old crap in.
Thanks,
Cozza
error 033: array must be indexed (variable "inputtext")
OR if its not possible:
Код:
if(dialogid == 2)
{
if(response) {
new string[128];
if(AccountInfo[playerid][Logged] == 1) return SendClientMessage(playerid, RED, "You are already logged in.");
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "/sAccounts/%s.seifadmin", plname);
if(!fexist(string))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Please register your account.", "Please input the password you want to register with", "Register", "Cancel");
return SendClientMessage(playerid, RED, "That account isn't registered! Please register: /register [password]");
}
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Please login to your account.", "Please input the password to your account", "Login", "Cancel");
OnPlayerLogin(playerid,inputtext);
}
}
return 0;
}
Thanks,
Cozza


