Raised This Month: $32 Target: $400
 8% 

Chat Argument


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Samantha
SourceMod Donor
Join Date: Feb 2010
Location: Madagascar
Old 03-29-2010 , 16:25   Chat Argument
Reply With Quote #1

I am trying to get an argument from say. This is the goal. When u click a button on a menu, it prints in chat type message and then what ever you type next is the argument and lets the command handle it.

Thank you for your help.
Samantha is offline
meng
Veteran Member
Join Date: Oct 2005
Location: us
Old 03-29-2010 , 17:40   Re: Chat Argument
Reply With Quote #2

If I understand correctly, I suppose you could set a global array variable in your menu callback, wait for the argument, then fake the corresponding command.

Example AddCommandListener callback...
PHP Code:
public Action:SayCallback(client, const String:command[], argc)
{
    if (
Cmd1[client] == 1)
    {
        
decl String:sText[maxstrlen];
        
GetCmdArgString(sTextsizeof(sText));
        
StripQuotes(sText);
        
FakeClientCommand(client"%s %s"YOUR_CMDsText);
        
Cmd1[client] = 0;
    }

__________________
.
[ 1 Dumerils Boa | 1 Cali King ]...
.
I'm a lil' spirituous.
meng is offline
Send a message via Yahoo to meng
Samantha
SourceMod Donor
Join Date: Feb 2010
Location: Madagascar
Old 03-29-2010 , 18:51   Re: Chat Argument
Reply With Quote #3

Thank you very much sir appreciate it.
Samantha 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 11:34.


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