/makeadmin command
#20

((Ignore the Double Post))

PHP Code:
CMD:makeadmin(playeridparams[])
{
    new
    
pID,
    
value;
    if(!(
PlayerInfo[playerid][pAdmin] >= 1338)) return SendClientMessage(playerid0xFF0000AA" you are not authorized to use this command!");
    else if (
sscanf(params"ui"pIDvalue)) return SendClientMessage(playerid0xFF0000AA"Usage: /makeadmin [playerid/partofname] [level 1-1338]");
    else if (
value || value 1338) return SendClientMessage(playerid0xFF0000AA"Unknown level! Only 1 to 1338");
    if(
IsPlayerConnected(pID)) {
    if(
pID == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_GREY,"Invalid player id");
    {
        new 
pName[MAX_PLAYER_NAME], tName[MAX_PLAYER_NAME], string[128];
        
GetPlayerName(playeridpNameMAX_PLAYER_NAME);
        
GetPlayerName(pIDtNameMAX_PLAYER_NAME);
        
format(stringsizeof(string), "You have promoted %s to Admin level %i"tNamevalue);
        
SCM(playeridCOLOR_LIGHTBLUEstring);
        
format(stringsizeof(string), "You have been promoted to Admin level %i by %s"valuepName);
        
SCM(pIDCOLOR_LIGHTBLUEstring);
        
PlayerInfo[pID][pAdmin] = value;
    }
    return 
1;

Try this.
Reply


Messages In This Thread
/makeadmin command - by Jafet_Macario - 24.08.2011, 20:13
Respuesta: /makeadmin command - by uprp - 24.08.2011, 20:19
Re: Respuesta: /makeadmin command - by Jafet_Macario - 24.08.2011, 20:24
Respuesta: Re: Respuesta: /makeadmin command - by uprp - 24.08.2011, 20:26
Re: Respuesta: /makeadmin command - by =WoR=G4M3Ov3r - 24.08.2011, 20:27
Respuesta: Re: Respuesta: /makeadmin command - by uprp - 24.08.2011, 20:29
Re: Respuesta: Re: Respuesta: /makeadmin command - by =WoR=G4M3Ov3r - 24.08.2011, 20:34
Re: /makeadmin command - by Jafet_Macario - 24.08.2011, 20:38
Re: /makeadmin command - by PrawkC - 24.08.2011, 20:44
Re: /makeadmin command - by =WoR=G4M3Ov3r - 24.08.2011, 20:46
Re: /makeadmin command - by Jafet_Macario - 24.08.2011, 20:59
Re: /makeadmin command - by =WoR=G4M3Ov3r - 24.08.2011, 21:02
Re: /makeadmin command - by Jafet_Macario - 24.08.2011, 21:04
Re: /makeadmin command - by =WoR=G4M3Ov3r - 24.08.2011, 21:07
Re: /makeadmin command - by PrawkC - 24.08.2011, 21:07
Re: /makeadmin command - by Jafet_Macario - 24.08.2011, 21:10
Re: /makeadmin command - by =WoR=G4M3Ov3r - 24.08.2011, 21:14
Re: /makeadmin command - by Jafet_Macario - 24.08.2011, 21:16
Re: /makeadmin command - by =WoR=G4M3Ov3r - 24.08.2011, 21:20
Re: /makeadmin command - by =WoR=G4M3Ov3r - 24.08.2011, 21:24
Re: /makeadmin command - by Jafet_Macario - 24.08.2011, 21:24
Re: /makeadmin command - by =WoR=G4M3Ov3r - 24.08.2011, 21:27
Re: /makeadmin command - by Jafet_Macario - 24.08.2011, 21:28

Forum Jump:


Users browsing this thread: 3 Guest(s)