Unban help
#1

Hello everybody.Today I try to make my own unban but code get bugged anyone can helps me..
pawn Код:
CMD:unban(playerid,params[])
{
    if(pInfo[playerid][pAdmin] < 3 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,""embed_red"[ERROR] "embed_white"You are not authorized to use this command!");
    new id,Query[250];
    if(sscanf(params,"u",id)) return SendUsage(playerid,"/unban [Player ID / Player Name]","0");

    format(Query,sizeof(Query),"SELECT * FROM `sampbans` WHERE `banusername` = '%s'",pName[id]);
    mysql_query(Query);
    mysql_store_result();
    if(mysql_num_rows() == 1)
    {
        SendClientMessageEx(playerid,0xFFFFFFF,""embed_orange"[Unban] "embed_white"%s has been unbanned!",pName[id]);
        format(Query,sizeof(Query),"DELETE * FROM `sampbans` WHERE `banusername` = '%s'",pName[id]);
        mysql_query(Query);
        mysql_store_result();
    }
    else if(!mysql_num_rows())
    {
        SendClientMessageEx(playerid,0xFFFFFFF,""embed_orange"[Unban] "embed_white"%s is not in database!",pName[id]);
        mysql_free_result();
    }
    return 1;
}
Problem is when I type /unban Wispo which name is in database it`s says me Unkown Command but when I type /unban Sanady it`s says Sanady is not in database...Anyone can helps me please!?

-Thanks Sanady
Reply


Messages In This Thread
Unban help - by Sanady - 15.08.2013, 10:36
Re: Unban help - by Sanady - 15.08.2013, 10:53
Re: Unban help - by Sanady - 15.08.2013, 11:16
Re: Unban help - by Sanady - 15.08.2013, 20:38
Re: Unban help - by Virtual1ty - 16.08.2013, 02:09

Forum Jump:


Users browsing this thread: 1 Guest(s)