Help with function
#1

It just don't work
pawn Код:
stock IsPlayerBanned(playerid)
{
    new queue[16];
    format(queue, sizeof(queue), "SELECT * FROM `PlayerBans` WHERE IP='%s'", PlayerIP(playerid)); //It should me something like: If the PlayerName/IP is in the "PlayerBans" data base then he is banned...
    return 1;
}
Example Usage:
pawn Код:
dcmd_AmIBanned(playerid, params[])
{
    #pragma unused params
    if(IsPlayerBanned(playerid))
    {
        SendClientMessage(playerid, COLOR_INFO, "You is banned");
        return 1;
    }
    else if(!IsPlayerBanned(playerid))
    {
        SendClientMessage(playerid, COLOR_INFO, "You is NOT banned");
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
Help with function - by Unknown123 - 05.03.2011, 16:13
Re: Help with function - by famas.[FTW] - 05.03.2011, 16:48
Re: Help with function - by Unknown123 - 05.03.2011, 17:01

Forum Jump:


Users browsing this thread: 1 Guest(s)