Quote:
Originally Posted by L.Hudson
I suggest you to use a stock for all "GetPlayerFunctions" example:
pawn Код:
stock NAME(playerid) // Put it in the last line of your script { new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); return pname; }
in other words, try using this:
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[playerid] >= 4) { new str[128]; format(str, sizeof(str), "[Ban Request] %s(%d) requested a ban on %s(%d) for %s", NAME(playerid), playerid, NAME(id), id, reason); SendClientMessage(a, COLOR_RED, str); } } return 1; }
|
First, thank you very much for your response.
I don't really like to use stocks, as I've had trouble with them in the past.
Quote:
Try :
pawn Код:
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME); GetPlayerName(id, PlayerName2, MAX_PLAYER_NAME);
should work.
EDIT : too late.
|
Thanks again for your help, but I'm still getting the same error.