04.04.2013, 16:33
I suggest you to use a stock for all "GetPlayerName" functions, example:
in other words, try using this:
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;
}
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;
}