/makeadmin command
#5

Quote:
Originally Posted by uprp
View Post
pawn Code:
CMD:makeadmin(playerid, params[])
{
    new pName[64], file[128], string[128], level, id;
    GetPlayerName(id,(pName),sizeof(pName));
    format(file,sizeof(file), USER_FILE, pName);
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0x0,"Only admins can use this command");
    if(sscanf(params, "i", level)) return SendClientMessage(playerid,0x0,"USAGE: /makeadmin [level]");
    if(level < 0 || level > 1338) return SendClientMessage(playerid,0x0,"Max Admin Level is 1338!");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0x0,"Player not found");
    else
    {
        pInfo[id][pAdmin] = level;
        dini_IntSet(file,"pAdmin",level);
        format(string,sizeof(string),"You have just set %s Admin Level to %i", pName, level);
        SendClientMessage(playerid,0x0,string);
        }
    return true;
}
Tell me if that works, please rep if it did
Why did you Strip it ?, Funny, People stripping codes from GF Edits, and paste it to help others.
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: 7 Guest(s)