Jump to content
  • 0

megaphone script


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

 

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 ❤️ 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

-	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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

-	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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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 ❤️ 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

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;
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

15 hours ago, melv0 said:

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


bindatcmd "torpedo","Megaphone::OnCommand",5;
I am not able to use the @torpedo command for VIP players
only with GM / ADM accounts
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

-	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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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?

Link to comment
Share on other sites

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.

×
×
  • Create New...