Raised This Month: $ Target: $400
 0% 

Example of MessageMode?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nicolazo103
Veteran Member
Join Date: Jan 2009
Location: I have no fu*** idea
Old 03-19-2010 , 16:43   Example of MessageMode?
Reply With Quote #1

HI everyone, i was wondering if you could give me an example of using messagemode. Well, something like how to hold what you write in a string and then using it in the selected function
__________________
Why do they send babies to fight me? -Heavy

nicolazo103 is offline
Old 03-19-2010, 16:51
KadiR
This message has been deleted by KadiR. Reason: mistake found by fysiks
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-19-2010 , 17:42   Re: Example of MessageMode?
Reply With Quote #2

You have an example in pluginmenu.sma :

register_clcmd("amx_changecvar","CommandChang eCvar");
// ...
client_cmd(id,"messagemode amx_changecvar");
// ...
public CommandChangeCvar(id)
{

}
__________________
Arkshine is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-19-2010 , 19:14   Re: Example of MessageMode?
Reply With Quote #3

Quote:
Originally Posted by KadiR View Post
[s]Something like this?
Incorrect. Please remove your code to prevent confusion .
__________________

Last edited by fysiks; 03-19-2010 at 19:16.
fysiks is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 03-19-2010 , 19:15   Re: Example of MessageMode?
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
[/s]
Incorrect. Please remove your code to prevent confusion .
Done.

EDIT: Can you tell me please, where I was wrong? I am using it and it works fine for me.

Last edited by KadiR; 03-19-2010 at 20:03.
KadiR is offline
nicolazo103
Veteran Member
Join Date: Jan 2009
Location: I have no fu*** idea
Old 03-19-2010 , 23:10   Re: Example of MessageMode?
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
You have an example in pluginmenu.sma :

register_clcmd("amx_changecvar","CommandChang eCvar");
// ...
client_cmd(id,"messagemode amx_changecvar");
// ...
public CommandChangeCvar(id)
{

}
But how can i hold the message in a string?
__________________
Why do they send babies to fight me? -Heavy

nicolazo103 is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 03-19-2010 , 23:33   Re: Example of MessageMode?
Reply With Quote #6

MessageMode it's just a 'shortcut' to the command, so you use read_args/read_argv in the command function to get the message...for example, in pluginmenu.sma both read_arg(s|v) are used, and btw, you should use remove_quotes after that.
__________________

Last edited by IneedHelp; 03-19-2010 at 23:37.
IneedHelp is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-20-2010 , 00:52   Re: Example of MessageMode?
Reply With Quote #7

Quote:
Originally Posted by nicolazo103 View Post
But how can i hold the message in a string?
Tell us what you are trying to do.
__________________
fysiks is offline
nicolazo103
Veteran Member
Join Date: Jan 2009
Location: I have no fu*** idea
Old 03-20-2010 , 10:06   Re: Example of MessageMode?
Reply With Quote #8

IŽd like to do something like a whisperer (pm)
__________________
Why do they send babies to fight me? -Heavy

nicolazo103 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-20-2010 , 18:06   Re: Example of MessageMode?
Reply With Quote #9

Quote:
Originally Posted by nicolazo103 View Post
IŽd like to do something like a whisperer (pm)
Like amx_psay <target> <message> (message only to specified person) or say @message (or maybe say_team @message; messages to all admins.
__________________
fysiks is offline
nicolazo103
Veteran Member
Join Date: Jan 2009
Location: I have no fu*** idea
Old 03-20-2010 , 19:59   Re: Example of MessageMode?
Reply With Quote #10

yeah, but iŽd like to do something by myself
__________________
Why do they send babies to fight me? -Heavy


Last edited by nicolazo103; 03-20-2010 at 20:02.
nicolazo103 is offline
Reply



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 08:44.


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