16.04.2011, 09:33
Okay so this is my ban CMD
I see nothing wrong with this, but it instantly bans the one who USED the command. also it doesnt whos a reason, but it should return a Sed ClientMessage, but it doesnt. Whats wrong with it? No errors.
pawn Код:
CMD:ban(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] > 2 || IsPlayerAdmin(playerid))
{
new id, reason[50], string[128], banned[MAX_PLAYER_NAME];
GetPlayerName(playerid, banned, sizeof(banned));
if(PlayerInfo[playerid][pAdminLevel] >= 1)
if(sscanf(params, "uz", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /ban [playerid] [reason(optional)]");
format(string, sizeof(string), "AdmCmd: %s has been banned by %s. reason: %s", banned, GetName(playerid), reason);
SendClientMessageToAll(red, string);
BanEx(id, reason);
}
else return 0;
return 1;
}