Help with /makeadmin command.
#4

try this... with sscanf...
pawn Код:
dcmd_makeadmin(playerid, params[])
{
if(Player[playerid][level] < 4 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"Must be admin level 4");
new pID,alevel;
if(sscanf(params,"ii",pID,alevel)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /makeadmin id level");
if(!IsPlayerConnected(pID)) return SendClientMessage (playerid,COLOR_RED,"Nobody is connected with this ID!");
new string[128],string2[128],aname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
Player[pID][level] = alevel;
GetPlayerName(playerid,aname,sizeof(aname));
GetPlayerName(pID,name,sizeof(name));
format(string,sizeof(string),"You have set the admin level of %s to %d",name,alevel);
format(string2,sizeof(string2),"ServerOwner %s has set your admin level to %d",aname,alevel);
SendClientMessage(playerid,COLOR_GREEN,string);
SendClientMessage(pID,COLOR_GREEN,string2);
return 1;
}
Reply


Messages In This Thread
Help with /makeadmin command. - by [BFT]eagles22 - 14.12.2010, 23:55
Re: Help with /makeadmin command. - by blackwave - 15.12.2010, 00:16
Re: Help with /makeadmin command. - by [BFT]eagles22 - 15.12.2010, 00:45
Re: Help with /makeadmin command. - by XePloiT - 15.12.2010, 02:34
Re: Help with /makeadmin command. - by [BFT]eagles22 - 21.12.2010, 00:16

Forum Jump:


Users browsing this thread: 1 Guest(s)