/makeadmin command
#9

pawn Code:
CMD:makeadmin(playerid, params[])
{
    new pID, value;
    if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, 0xFF0000AA, " you are not authorized to use this command!");
    if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /makeadmin [playerid/partofname] [level 1-1338]");
    if(value < 1 || value > 1338) return SendClientMessage(playerid, 0xFF0000AA, "Unknown level! Only 1 to 1338");
    if(pID == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY,"Invalid player id");
   
    new pName[MAX_PLAYER_NAME], tName[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    GetPlayerName(pID, tName, MAX_PLAYER_NAME);
    format(string, sizeof(string), "You have promoted %s to Admin level %i", tName, value);
    SCM(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "You have been promoted to Admin level %i by %s", value, pName);
    SCM(pID, COLOR_LIGHTBLUE, string);
    PlayerInfo[pID][pAdmin] = value;
    return 1;
}
Try that
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: 8 Guest(s)