Check ban bugged
#1

Hello,in my server i've a variable pBanned, i set it to 1 when i ban someone.

The problem is:

I made a little timer to check,when a player joins,after login, if his account is banned or not,the problem is it keeps kick out even the not banned players (pBanned = 0).

Here is:

pawn Код:
public CheckBan(playerid)
{
    if(PlayerInfo[playerid][pBanned] == 1)
    {
    new Pname[24];
    new msg[128];
    new msg2[128];
    GetPlayerName(playerid, Pname, 24);
    SendClientMessage(playerid,0xFF0000FF,"Your account is banned, post a ban appeal on");
    format(msg, sizeof(msg), "0,4System: %s (%d) has been kicked. [Account is banned]", Pname, playerid);
    format(msg2, sizeof(msg2), "System: %s (%d) has been kicked. [Account is banned]", Pname, playerid);
    format(LastKick,sizeof(LastKick),"System: %s (%d) has been kicked. [Account is banned]",  Pname,playerid);
    IRC_GroupSay(gGroupID, IRC_ACHANNEL, msg);
    IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
    Kick(playerid);
    }
    return 1;
}
Reply
#2

show the timers code also
Reply
#3

Do you have this in his user profile like:

Banned = 0

Do you store the banned stats in his user.ini?
Reply
#4

Oh, nvm. The check ban working perfect, it was another check that was kicking players. nvm.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)