/makeadmin command
#1

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

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
Reply
#3

Код:
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;
}
Reply
#4

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;

Reply
#5

Thanks.
- Lock.
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)