If player is banned
#8

pawn Код:
public OnPlayerConnect(playerid)
{
    new file[128], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    format(file, sizeof(file), "Users/%s.ini", pName);
    if(!fexist(file))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Please Register", "Enter Your Password Below", "Register", "Cancel");
    }
    else
    {
        Player[playerid][Banned] = dini_Int(file, "Banned");
        if(Player[playerid][Banned] == 0)
        {
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Please Login", "Enter Your Password Below", "Login", "Cancel");
        }
        else
        {
            SendClientMessage(playerid, RED, "You are banned gtfo");
            Kick(playerid);
         }
    }
    return 1;
}
try this.
Reply


Messages In This Thread
If player is banned - by Kingunit - 07.08.2011, 23:47
Re: If player is banned - by Tee - 07.08.2011, 23:49
Re: If player is banned - by Kingunit - 07.08.2011, 23:51
Re : If player is banned - by Soumi - 07.08.2011, 23:52
Re: If player is banned - by Kingunit - 07.08.2011, 23:53
Re: If player is banned - by Tee - 07.08.2011, 23:54
Re: If player is banned - by Kingunit - 07.08.2011, 23:57
Re : If player is banned - by Soumi - 08.08.2011, 00:03
Re: If player is banned - by Tee - 08.08.2011, 00:08
Re : If player is banned - by Soumi - 08.08.2011, 00:11

Forum Jump:


Users browsing this thread: 3 Guest(s)