Jump to content

Question

Posted

 

Hello friends, I would like a simple VIP-only script (Group 5) to send a global message (/b for example) when typing the command @torpedo open a small panel to select the color and then type the desired message. (if a color selection for the text is not possible, only the global message will serve)

thanks a lot guys ❤️ 

7 answers to this question

Recommended Posts

  • 0
Posted
-	script	Megaphone	-1,{

OnCommand:

	if(vip_status(VIP_ACTIVE)) {
		setarray .@color$[0],"ff0000","00ff00","0000ff";
		for(.@size = getarraysize(.@color$);.@i < .@size;.@i++)
			.@menu$+= "^"+.@color$[.@i]+"Sample:";
		.@color = select(.@menu$) - 1;
		input .@msg$;
		if(.@msg$ != " " && .@msg$ != "0")
			announce strcharinfo(0)+": "+.@msg$,bc_all,"0x"+.@color$[.@color];
	} else {
		message strcharinfo(0),"This command is only avaiaible to VIPs.";
	}
	end;

OnInit:

	bindatcmd "torpedo","Megaphone::OnCommand";
	end;

}

 

  • Love 1
  • 0
Posted
-	script	Megaphone	-1,{

OnCommand:

	setarray .@color$[0],"ff0000","00ff00","0000ff";
	for(.@size = getarraysize(.@color$);.@i < .@size;.@i++)
		.@menu$+= "^"+.@color$[.@i]+"Sample:";
	.@color = select(.@menu$) - 1;
	input .@msg$;
	if(.@msg$ != " " && .@msg$ != "0")
		announce .@msg$,bc_all,"0x"+.@color$[.@color];
	end;

OnInit:

	bindatcmd "torpedo","Megaphone::OnCommand",5;
	end;

}

 

  • Love 1
  • 0
Posted
1 hour ago, n0tttt said:

-	script	Megaphone	-1,{

OnCommand:

	setarray .@color$[0],"ff0000","00ff00","0000ff";
	for(.@size = getarraysize(.@color$);.@i < .@size;.@i++)
		.@menu$+= "^"+.@color$[.@i]+"Sample:";
	.@color = select(.@menu$) - 1;
	input .@msg$;
	if(.@msg$ != " " && .@msg$ != "0")
		announce .@msg$,bc_all,"0x"+.@color$[.@color];
	end;

OnInit:

	bindatcmd "torpedo","Megaphone::OnCommand",5;
	end;

}

 

 

the best scripter ever! could you add group restriction to just VIP? in the case group 5

Thank you ❤️ 

  • 0
Posted
On 12/21/2018 at 2:36 AM, IsabelaFernandez said:

 

the best scripter ever! could you add group restriction to just VIP? in the case group 5

Thank you ❤️ 

i think its already set just only for VIP member(Groupid level 5)
see this part
 

bindatcmd "torpedo","Megaphone::OnCommand",5;
  • 0
Posted
-	script	Megaphone	-1,{

OnCommand:

	if(vip_status(VIP_ACTIVE)) {
		setarray .@color$[0],"ff0000","00ff00","0000ff";
		for(.@size = getarraysize(.@color$);.@i < .@size;.@i++)
			.@menu$+= "^"+.@color$[.@i]+"Sample:";
		.@color = select(.@menu$) - 1;
		input .@msg$;
		if(.@msg$ != " " && .@msg$ != "0")
			announce .@msg$,bc_all,"0x"+.@color$[.@color];
	} else {
		message strcharinfo(0),"This command is only avaiaible to VIPs.";
	}
	end;

OnInit:

	bindatcmd "torpedo","Megaphone::OnCommand";
	end;

}

 

  • Upvote 1
  • 0
Posted
59 minutes ago, n0tttt said:

-	script	Megaphone	-1,{

OnCommand:

	if(vip_status(VIP_ACTIVE)) {
		setarray .@color$[0],"ff0000","00ff00","0000ff";
		for(.@size = getarraysize(.@color$);.@i < .@size;.@i++)
			.@menu$+= "^"+.@color$[.@i]+"Sample:";
		.@color = select(.@menu$) - 1;
		input .@msg$;
		if(.@msg$ != " " && .@msg$ != "0")
			announce .@msg$,bc_all,"0x"+.@color$[.@color];
	} else {
		message strcharinfo(0),"This command is only avaiaible to VIPs.";
	}
	end;

OnInit:

	bindatcmd "torpedo","Megaphone::OnCommand";
	end;

}

 

 

It worked perfect! how do I get the nick of the player who sent the message before the phrase?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...