23.01.2013, 14:03
pawn Код:
CMD:banoff(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2 || IsPlayerAdmin(playerid))
{
new name[100];
new file[128];
new targetid;
GetPlayerName(targetid, name, sizeof(name));
new name2[12] = name;//must be a constant expression, assumed zero
new name3 = strval(name2);
new reason[128];
if(sscanf(params,"s[100]s[128]", name,reason)) return SendClientMessage(playerid, 0xFFFFFFFF, "[USAGE]: /banoff [name] [reason]");
format(file, sizeof(file),"Admin/Accounts/%s.ini", name);
if(!fexist(file)) return SendClientMessage(playerid, 0xFF0000AA, "Player is not on the database");
BanPlayer(name3,playerid,reason);
}
return 1;
}