need help command /aduty not work pls help
#1

need help command /aduty not work pls help iam need it now pls pls pls
Reply
#2

what do you want it to do? Also there's a topic called 'Script request' or something similar i think
Reply
#3

iam need command duty work he not work in servver
Reply
#4

i assume you have admin levels in your server?
does PlayerInfo[playerid][pAdmin] define admins?
Reply
#5

Top of your script
Код:
new Text3D:Aduty[MAX_PLAYERS];
new Duty[MAX_PLAYERS]= 0;
Код:
if(strcmp(cmdtext, "/aduty", true) == 0)
		{
 		if(PlayerInfo[playerid][pAdmin] >=1) //However you define whether a player is an administrator
			{
			new string[128];
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if(Duty[playerid] == 0)
			{
			Duty[playerid]= 1;
		    SetPlayerHealth(playerid,99999);
		    Aduty[playerid] = Create3DTextLabel("ADMIN ON DUTY! DO NOT ATTACK",GetPlayerColor(playerid),0.0,0.0,0.0,NAMETAG_DRAW_DISTANCE,-1,0);
  			Attach3DTextLabelToPlayer(Aduty[playerid],playerid,0.0,0.0,0.75);
  			format(string, sizeof(string), "* Admin %d %s is now on Admin Duty!.", PlayerInfo[playerid][pAdmin],sendername);
			SendClientMessageToAll(0xAA3333AA, string);
  			}
  			else
  			{
			SetPlayerHealth(playerid,100);
  			Duty[playerid]= 0;
		    Delete3DTextLabel(Aduty[playerid]);
	  		format(string, sizeof(string), "* %d %s is now off Admin Duty!.", PlayerInfo[playerid][pAdmin],sendername);
			SendClientMessageToAll(0xAA3333AA, string);
		            }
		        }
				else
				{
				SendClientMessage(playerid,0x1229FAFF, "you're not an admin!");
				}
		return 1;
	}
That's something basic i just came up with. Should be pretty awesome.
Reply
#6

Quote:
Originally Posted by Marco_Valentine
Посмотреть сообщение
Top of your script
Код:
new Text3D:Aduty[MAX_PLAYERS];
new Duty[MAX_PLAYERS]= 0;
Код:
if(strcmp(cmdtext, "/aduty", true) == 0)
		{
 		if(PlayerInfo[playerid][pAdmin] >=1) //However you define whether a player is an administrator
			{
			new string[128];
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if(Duty[playerid] == 0)
			{
			Duty[playerid]= 1;
		    SetPlayerHealth(playerid,99999);
		    Aduty[playerid] = Create3DTextLabel("ADMIN ON DUTY! DO NOT ATTACK",GetPlayerColor(playerid),0.0,0.0,0.0,NAMETAG_DRAW_DISTANCE,-1,0);
  			Attach3DTextLabelToPlayer(Aduty[playerid],playerid,0.0,0.0,0.75);
  			format(string, sizeof(string), "* Admin %d %s is now on Admin Duty!.", PlayerInfo[playerid][pAdmin],sendername);
			SendClientMessageToAll(0xAA3333AA, string);
  			}
  			else
  			{
			SetPlayerHealth(playerid,100);
  			Duty[playerid]= 0;
		    Delete3DTextLabel(Aduty[playerid]);
	  		format(string, sizeof(string), "* %d %s is now off Admin Duty!.", PlayerInfo[playerid][pAdmin],sendername);
			SendClientMessageToAll(0xAA3333AA, string);
		            }
		        }
				else
				{
				SendClientMessage(playerid,0x1229FAFF, "you're not an admin!");
				}
		return 1;
	}
That's something basic i just came up with. Should be pretty awesome.
sory for late man iam type you cod and command unknow help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)