06.12.2011, 23:37
Hey,
I made this command:
Unforantly it doesnt work.
Could someone please explain why this is?
Thanks
-Michael
I made this command:
pawn Код:
CMD:makeadmin(playerid,params[])
{
new string[128],name[MAX_PLAYER_NAME],pID,Level;
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
if(!IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] <= 0) return 0;
if(j_sscanf(params,"ui",pID,Level)) return SendClientMessage(playerid,COLOR_GREY,"/makeadmin <player> <level>");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,COLOR_GREY,"Invalid Player Specified");
else if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] >= 1338)
{
PlayerInfo[pID][pAdminLevel] = Level;
format(string,sizeof(string),"** ADMIN PROMOTE: %s Is Now An Administrator Level %d!",name,Level);
SendClientMessageToAll(COLOR_PINK,string);
GameTextForPlayer(pID,"Promoted",3000,4);
return 1;
}
return 1;
}
Could someone please explain why this is?
Thanks
-Michael