SA-MP Forums Archive
/makeadmin command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /makeadmin command (/showthread.php?tid=397922)



/makeadmin command - Hardwyn - 07.12.2012

Hi guys. I need a zcmd /makeadmin command. Help me please.


Re: /makeadmin command - InfiniTy. - 07.12.2012

Well you need a command.. we need information about your gamemode/saving system etc.
Also you can't request scripts here.. you need to make it on a 'special' topic
https://sampforum.blast.hk/showthread.php?tid=187229


AW: /makeadmin command - Blackazur - 07.12.2012

Код:
COMMAND:makeadmin(playerid,params[])
{
	new id, alvl;
	if(sscanf(params,"dd",id,alvl)) return NoSuccess(playerid,"Usage: /makeadmin <id> <adminlevel>");
	if(Admin[playerid] < 4) return NoSuccess(playerid,"You cannot use this Command!");
	if(!IsPlayerConnected(id)) return NoSuccess(playerid,"Player is not connected!");
	if(alvl < 0 || alvl > 4) return NoSuccess(playerid,"Level between 0 and 4!");
	
	Admin[id] = alvl;
	format(str,144,"%s made you admin level *%d!",pname[playerid],alvl);
	SendClientMessage(id,rot,str);
	format(str,144,"You made %s admin level *%d!",pname[id],alvl);
	SendClientMessage(playerid,rot,str);
	return 1;
}



Re: /makeadmin command - Frapsy - 07.12.2012

PHP код:
CMD:makeadmin(playerid,params[]) {
     if(!
IsPlayerAdmin(playerid)) return 1;
     new 
a,b;
     if(
sscanf(params,"pi",a,b) return SendClientMessage(playerid,-1,"USAGE: /makeadmin <id/name> <lvl>
     pInfo[a][adm] = b;
     return 1;




Re: /makeadmin command - Hardwyn - 07.12.2012

Thanks.
- Lock.


Re: /makeadmin command - gtakillerIV - 07.12.2012

I'd suggest you to use a saving system like y_ini for saving the player's Admin level.