25.06.2011, 11:11
Ok ty that worked. But how will I do it here?
I don't want to use GetPlayerName everywhere.
I don't want to use GetPlayerName everywhere.
pawn Код:
COMMAND:makeadmin(playerid,params[])
{
new level,id;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_GREY,"You're not an Infinity RCON admin, you're not allowed to use this.");
if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /makeadmin [playerid] [level]");
format(String,sizeof(String),"%s made you a admin level %d",Name[playerid],level);
SendClientMessage(id,COLOR_ORANGE,String);
format(String,sizeof(String),"You've made %s admin level %d",Name[id],level);
SendClientMessage(playerid,COLOR_ORANGE,String);
PlayerInfo[id][pAdminLevel] = level;
return 1;
}