Raised This Month: $ Target: $400
 0% 

How to set 2 options in 1 function


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-01-2010 , 00:24   Re: How to set 2 options in 1 function
Reply With Quote #1

With these:

PHP Code:
register_concmd("amx_myfunction""cmdFunction"_"<option1> <option2>")

public 
cmdFunction(id)
{
    new 
arg1[32], arg2[3]
    
read_argv(1arg1charsmax(arg1))
    
read_argv(2arg2charsmax(arg2))
    
    
// arg1 contains the string of <option1>
    // arg2 contains the string of <option2>
    
    
new player cmd_target(idarg1)
    if(
player)
    {
        
set_user_godmode(idstr_to_num(arg2))
    }
    return 
PLUGIN_HANDLED

__________________

Last edited by fysiks; 06-01-2010 at 00:32.
fysiks 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 05:17.


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