AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to set 2 options in 1 function (https://forums.alliedmods.net/showthread.php?t=128420)

t*stylez 05-31-2010 23:42

How to set 2 options in 1 function
 
Okay, so for example.
amx_super command godmode
amx_godmode NAME <0(off), 1 (1 round) or 2(perm)>

can someone tell me how i would do this?
but instead of
Code:

0 1 2
i want
Code:

1 on perm 2 off
like another amx_godmode example
i looked through amx_super but didn't learn how.

fysiks 05-31-2010 23:51

Re: How to set 2 options in 1 function
 
I don't get it. What do you want?

t*stylez 05-31-2010 23:53

Re: How to set 2 options in 1 function
 
like i need to know how to do this

amx_godmode NAME 1 or 2
Code:

1 = perm 2 = off

fysiks 05-31-2010 23:55

Re: How to set 2 options in 1 function
 
Link to the plugin and I can look at it.

0 is basically always used for off in just about everything.

t*stylez 05-31-2010 23:57

Re: How to set 2 options in 1 function
 
https://forums.alliedmods.net/showthread.php?t=19542

so like
amx_godmode 1 = on 2 = off
amx_noclip 1 = on 2 = off

fysiks 05-31-2010 23:59

Re: How to set 2 options in 1 function
 
Quote:

Originally Posted by t*stylez (Post 1196717)
http://forums.alliedmods.net/showthread.php?p=199742

so like
amx_godmode 1 = on 2 = off
amx_noclip 1 = on 2 = off

I don't get it. That's not AMX Super.

t*stylez 06-01-2010 00:02

Re: How to set 2 options in 1 function
 
updated:

https://forums.alliedmods.net/showthread.php?t=19542

fysiks 06-01-2010 00:11

Re: How to set 2 options in 1 function
 
FYI
amx_godmode <nick, #userid, authid or @team> [0|1|2] - 0=OFF 1=ON 2=ON + ON EACH ROUND

t*stylez 06-01-2010 00:12

Re: How to set 2 options in 1 function
 
i know. i wanna learn how to do that.
how did he put 2 options into 1 function? hence the title name

like make a small give god-mode example

fysiks 06-01-2010 00:24

Re: How to set 2 options in 1 function
 
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




All times are GMT -4. The time now is 05:17.

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