22.05.2012, 15:49
Switch your register command to this one.
What's changed:
to
pawn Код:
CMD:register(playerid, params[])
{
new sStr[64];
if(gPlayerLogged[playerid] == 1)
return SendClientMessage(playerid, COLOR_GREY, " You're already logged.");
format(sStr, 64, "Players/%s.ini", PlayerName(playerid));
new File: hFile = fopen(sStr, io_read);
if(hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "This Nick already exists, use another.");
fclose(hFile);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "TEST", "TEST\n{5CACEE}Enter your Password to Register!", "Register", "Cancel");
return 1;
}
new tmppass[64];
if(sscanf(params, "s[64]", tmppass))
{
OnPlayerRegister(playerid, tmppass);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "/register [password]");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "TEST", "TEST\n{5CACEE}Enter your Password to Register!", "Register", "Cancel");
}
return 1;
}
pawn Код:
if(sscanf(params, "d[64]", tmppass))
pawn Код:
if(sscanf(params, "s[64]", tmppass))