Raised This Month: $ Target: $400
 0% 

messagemode - getting more than 1 argument


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Jon
Veteran Member
Join Date: Dec 2007
Old 10-11-2009 , 05:41   Re: messagemode - getting more than 1 argument
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
You could parse the text
PHP Code:
public CmdGetDataiClient )
{
    new 
szArg32 ];
    
read_argsszArg32 );

    if( !
strlenszArg ) )
    {
        return 
PLUGIN_HANDLED;
    }
    
    
remove_quotesszArg );
    
    new 
szR], szG], szB];
    
parseszArgszR3szG3szB);
    
    new 
iRiGiB;
    
iR str_to_numszR ), iG str_to_numszG ), iB str_to_numszB );
    
    
console_printiClient"%i %i %i"iRiGiB );
    
    return 
PLUGIN_HANDLED;

You should also clamp the values.
Jon is offline
 



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 22:38.


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