PHP код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
//..
if(fexist(Path(playerid)))
{
INI_ParseFile(Path(playerid),"loadaccount_user", .bExtra = true, .extra = playerid)
//..
if(pInfo[playerid][Banned] == 1 || pInfo[playerid][oBanned] == 1)
{
SendClientMessage(playerid,COLOR_RED,"[INFO] Your account is currently suspended from this server");
SetTimerEx("DelayedKick", 500, false, "d", playerid);
}
else ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT, "Mickey's: Simply TDM", "This account is registered,\nplease insert your password below", "Login", "Exit");
}
else if(!fexist(Path(playerid)))
{
pInfo[playerid][Adminlevel] = 0;
pInfo[playerid][VIPlevel] = 0;
// restart all variables per player..
ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Mickey's: Simply TDM","Welcome, this username is available!\nEnter a password below to register it","Register", "Exit");
}
return true;
}