Raised This Month: $ Target: $400
 0% 

How to set 2 options in 1 function


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
t*stylez
BANNED
Join Date: Apr 2010
Old 05-31-2010 , 23:42   How to set 2 options in 1 function
Reply With Quote #1

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.
t*stylez is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-31-2010 , 23:51   Re: How to set 2 options in 1 function
Reply With Quote #2

I don't get it. What do you want?
__________________
fysiks is offline
t*stylez
BANNED
Join Date: Apr 2010
Old 05-31-2010 , 23:53   Re: How to set 2 options in 1 function
Reply With Quote #3

like i need to know how to do this

amx_godmode NAME 1 or 2
Code:
1 = perm 2 = off
t*stylez is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-31-2010 , 23:55   Re: How to set 2 options in 1 function
Reply With Quote #4

Link to the plugin and I can look at it.

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

Last edited by fysiks; 05-31-2010 at 23:58.
fysiks is offline
t*stylez
BANNED
Join Date: Apr 2010
Old 05-31-2010 , 23:57   Re: How to set 2 options in 1 function
Reply With Quote #5

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

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

Last edited by t*stylez; 06-01-2010 at 00:02.
t*stylez is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-31-2010 , 23:59   Re: How to set 2 options in 1 function
Reply With Quote #6

Quote:
Originally Posted by t*stylez View Post
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.
__________________
fysiks is offline
t*stylez
BANNED
Join Date: Apr 2010
Old 06-01-2010 , 00:02   Re: How to set 2 options in 1 function
Reply With Quote #7

updated:

https://forums.alliedmods.net/showthread.php?t=19542
t*stylez is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-01-2010 , 00:11   Re: How to set 2 options in 1 function
Reply With Quote #8

FYI
amx_godmode <nick, #userid, authid or @team> [0|1|2] - 0=OFF 1=ON 2=ON + ON EACH ROUND
__________________
fysiks is offline
t*stylez
BANNED
Join Date: Apr 2010
Old 06-01-2010 , 00:12   Re: How to set 2 options in 1 function
Reply With Quote #9

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

Last edited by t*stylez; 06-01-2010 at 00:19.
t*stylez is offline
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 #10

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


Thread Tools
Display Modes

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