Help with /aduty and /v
#1

How to make a command /aduty that put admin on duty and how to make a /v command with model name or part of model name.
Reply
#2

u must first enum that like

Код:
enum ainfo {
        onduty
}
and then

under onplayerconnect

Код:
ainfo[playerid][onduty] = 0;
and under on player disconnet
Код:
ainfo[playerid][onduty] = 0;
and now start making command like

Код:
CMD:onduty(playerid,params[])
{
            if.........//here your level check command{
	    if(aInfo[playerid][OnDuty] == 0)
	    {
 			aInfo[playerid][OnDuty] = 1;
 			return SendClientMessage(playerid,0x00FFAA,"|- You are now in \"Duty Mode\" -|");
		}
		else
		{
			aInfo[playerid][OnDuty] = 0;
 			return SendClientMessage(playerid,0x00FFAA,"|- You are now in \"Playing Mode\"-|");
		}
	}
	return SendClientMessage(playerid, red, "You are not high enough to use this command");
}
Reply
#3

Why an enum? Ofcourse it works, but I suggest you using something like
pawn Код:
new bool:aduty[MAX_PLAYERS]
Reply
#4

Quote:
Originally Posted by dusk
Посмотреть сообщение
Why an enum? Ofcourse it works, but I suggest you using something like
pawn Код:
new bool:aduty[MAX_PLAYERS]
Or even better: Bit-flags https://sampforum.blast.hk/showthread.php?tid=216730 (scroll down)

About /v [id/part of name]: This command has been made and given out 293874234 times before. A simple search in the Script Request thread will help you find it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)