28.08.2011, 16:06
Use this code:
pawn Code:
public OnPlayerConnect(playerid)
{
gPlayerLogged[playerid] = 0;
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if (!dini_Exists(file))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "REGISTER", "Unesite zeljenu sifru da se registrirate.", "Register", "Izlaz");
}
if(fexist(file))
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "LOGIN", "Unesite vasu sifru da se logirate.", "Login", "Izlaz");
}
return 1;
}