AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Example of MessageMode? (https://forums.alliedmods.net/showthread.php?t=121770)

nicolazo103 03-19-2010 16:43

Example of MessageMode?
 
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 :D :mrgreen:

Arkshine 03-19-2010 17:42

Re: Example of MessageMode?
 
You have an example in pluginmenu.sma :

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

}

fysiks 03-19-2010 19:14

Re: Example of MessageMode?
 
Quote:

Originally Posted by KadiR (Post 1122651)
[s]Something like this?

Incorrect. Please remove your code to prevent confusion :).

KadiR 03-19-2010 19:15

Re: Example of MessageMode?
 
Quote:

Originally Posted by fysiks (Post 1122834)
[/s]
Incorrect. Please remove your code to prevent confusion :).

Done. :( :P

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

nicolazo103 03-19-2010 23:10

Re: Example of MessageMode?
 
Quote:

Originally Posted by Arkshine (Post 1122704)
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?

IneedHelp 03-19-2010 23:33

Re: Example of MessageMode?
 
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.

fysiks 03-20-2010 00:52

Re: Example of MessageMode?
 
Quote:

Originally Posted by nicolazo103 (Post 1122980)
But how can i hold the message in a string?

Tell us what you are trying to do.

nicolazo103 03-20-2010 10:06

Re: Example of MessageMode?
 
IŽd like to do something like a whisperer (pm)

fysiks 03-20-2010 18:06

Re: Example of MessageMode?
 
Quote:

Originally Posted by nicolazo103 (Post 1123286)
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.

nicolazo103 03-20-2010 19:59

Re: Example of MessageMode?
 
yeah, but iŽd like to do something by myself :P


All times are GMT -4. The time now is 08:44.

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