Raised This Month: $ Target: $400
 0% 

Message Mode


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
umarsa
Senior Member
Join Date: Feb 2006
Location: U.K
Old 12-17-2006 , 19:22   Message Mode
Reply With Quote #1

Code:
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd("test", "test")
}

public test(id) 
{
	//  client has to do command "messagemode test" has to be same as the public function
	new message[192]
	// Get message and remove quotes
	read_args(message, 191)
	remove_quotes(message)	
	client_print(id, print_chat, "You Typed: ^"%s^"", message)
	return PLUGIN_HANDLED
}
Now do i make it so when they type "amx_test" in their console it will make a messagemode come and after they have typed their message it will print_chat in the clients chat area?
__________________
umarsa is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 12-17-2006 , 22:40   Re: Message Mode
Reply With Quote #2

I can't decipher what you are asking exactly...

If the client binds a key to "messagemode test" and pushes the key, they will see a prompt in the upper-left hand corner that says "test:". They can type whatever message they want, push enter, and it will display only to them: "You typed: "blahblahblahblah"".


If you want the client to simply bind a key to amx_test, and see the "test:" prompt in the upper-left when the key is pushed, add the following to your existing code.

Code:
register_clcmd("amx_test", "test_function") public test_function(id) {     client_cmd(id, "messagemode test") }
stupok is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-18-2006 , 04:20   Re: Message Mode
Reply With Quote #3

Command:
test: Show hudtext "Special Message Mode", execute the original 'say' command

Forward: Say, return and print it in clientprint ? or whatever you want to do with it.
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
umarsa
Senior Member
Join Date: Feb 2006
Location: U.K
Old 12-18-2006 , 05:01   Re: Message Mode
Reply With Quote #4

I found out how to do it.
__________________

Last edited by umarsa; 12-18-2006 at 05:08.
umarsa is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode