mysql unban command
#8

You should use cache_num_rows() as DobbysGamertag said.
pawn Код:
new query[126];
format(query, sizeof(query), "SELECT * FROM bantable WHERE BannedName = '%s' AND status = 1", GetPlayerNameEx(playerid));//Firstly we should select everything from your ban table however you named it.
mysql_tquery(mysql, query,"BanResults","i",playerid); //now we added a call back to check if this name is banned or not,


forward BanResults(playerid);
public BanResults(playerid)
{
    if(cache_num_rows(mysql) >=1)
    {
        //if this name was found.
    }
    else
    {
    //cannot find
    }
    return 1;
}
EDIT: This is a fast example taken from my gamemode, don't copy and paste you should modify it first!
Reply


Messages In This Thread
mysql unban command - by Copfan5 - 20.05.2014, 18:32
Re: mysql unban command - by guitardude01 - 20.05.2014, 20:59
Re: mysql unban command - by awsomedude - 20.05.2014, 21:22
Re: mysql unban command - by DobbysGamertag - 21.05.2014, 01:26
Re: mysql unban command - by Copfan5 - 21.05.2014, 02:05
Re: mysql unban command - by Copfan5 - 21.05.2014, 20:17
Re: mysql unban command - by Copfan5 - 23.05.2014, 16:56
Re: mysql unban command - by SilentSoul - 23.05.2014, 17:03

Forum Jump:


Users browsing this thread: 1 Guest(s)