03.12.2014, 18:37
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:
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"
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;
}