Checking if player is banned
#1

Hey, i've been working on a command to check if a player is banned or not
This is how i have set it out:
pawn Код:
ACMD:banned(playerid, params[])
{
    if (pInfo[playerid][Adminlevel] < 2)return 0;
    new targetid, str[128];
    if(sscanf(params,"u",targetid)) return SCM(playerid, orange, "--- /unban <Name>---");
    new INI:file = INI_Open(Path(targetid));
    INI_SetTag(file, "Player's Data");
    if(pInfo[playerid][Banned]==1)
    format(str, sizeof(str), "%s is banned", GetName(targetid));
    SCM(playerid, red, str);
    return 1;
}
When i type nothing happens, justs puts a blank message on chat, and if you are able to, if possible, add a bit where if player is not banned then it says to the admin, "Player is not banned"
Reply


Messages In This Thread
Checking if player is banned - by LeXuZ - 03.12.2014, 18:37
Re: Checking if player is banned - by iManakoss - 03.12.2014, 18:42
Re: Checking if player is banned - by LeXuZ - 03.12.2014, 18:57
Re: Checking if player is banned - by iManakoss - 03.12.2014, 19:01
Re: Checking if player is banned - by Raweresh - 03.12.2014, 19:03
Re: Checking if player is banned - by LeXuZ - 03.12.2014, 19:04
Re: Checking if player is banned - by DaniceMcHarley - 03.12.2014, 19:05
Re: Checking if player is banned - by LeXuZ - 03.12.2014, 19:09
Re: Checking if player is banned - by xCrazyMonkey - 04.12.2014, 06:44
Re: Checking if player is banned - by LeXuZ - 04.12.2014, 07:03

Forum Jump:


Users browsing this thread: 1 Guest(s)