Quote:
Originally Posted by SilverKiller
This should work fine :
pawn Код:
CMD:requestban(playerid, params[]) { new id[128], reason[128]; if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, COLOR_SILVER, "You must be atleast a level 1 administrator (Moderator) to use this command!"); if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_SILVER, "/requestban [id] [reason]"); //Define these variables (id, reason) for(new a; a<MAX_PLAYERS; a++) { if(AdminLevel[a] >= 4) { new str[128], PlayerName[MAX_PLAYER_NAME], PlayerName2[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); GetPlayerName(id, PlayerName2, sizeof(PlayerName2)); format(str, sizeof(str), "[Ban Request] %s(%d) requested a ban on %s(%d) for %s", PlayerName, playerid, PlayerName2, id, reason); //Use GetPlayerName for names. SendClientMessage(a, COLOR_RED, str); } } return 1; }
|
When I use that, I get the same error.
However, thank you very much fro your response!
anjh.