11.04.2011, 20:03
Here, try this:
Top of script:
Then:
Got them from here.
Hope it works!
Top of script:
pawn Код:
enum pInfo {
helper[64],
}
pawn Код:
public OnPlayerConnect(playerid)
{
new file[128], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
format(file, sizeof(file), UserFile, Name);
if(!fexist(file))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Register", "Please fill in a password:", "Register", "Cancel");
}
else
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Please fill in your password:", "Login", "Cancel");
}
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new file[128], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
format(file, sizeof(file), UserFile, Name);
dini_IntSet(file, "helper", gPlayerInfo[playerid][Level]);
gPlayerLogged[playerid] = 0;
return 1;
}
Hope it works!