Raised This Month: $ Target: $400
 0% 

Couple of menu related plugins


Post New Thread Reply   
 
Thread Tools Display Modes
[SAS]==Colster==
Junior Member
Join Date: Dec 2004
Old 06-13-2005 , 13:32  
Reply With Quote #11

Thanks for the help, could this plugin be adapted to suit toggling more than one plugin, say 6 or 7.

If you could give me an example of how extra "arg" could be added I may be able to add them myself.

And yes there is kinda a double post but as I pasted the link in I was kinda giving it away
[SAS]==Colster== is offline
Send a message via MSN to [SAS]==Colster==
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-13-2005 , 13:53  
Reply With Quote #12

Yea, sure. It's pretty simple.

Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Cvar cmd toggles","0.1","v3x")     register_clcmd("amx_jp","toggle_jp",ADMIN_KICK,"- toggles luds jetpack mode")     register_clcmd("amx_blah","toggle_blah",ADMIN_KICK,"- toggles blah mode") } public toggle_jp(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,0))         return PLUGIN_HANDLED     new arg = get_cvar_num("amx_luds_jetpack")     switch(arg)     {         case 0:         {             set_cvar_num("amx_luds_jetpack",1)             console_print(id,"[AMXX] Luds jetpack enabled")         }         case 1:         {             set_cvar_num("amx_luds_jetpack",0)             console_print(id,"[AMXX] Luds jetpack disabled")         }     }         return PLUGIN_HANDLED } public toggle_blah(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,0))         return PLUGIN_HANDLED     new arg = get_cvar_num("amx_blah_cvar")     switch(arg)     {         case 0:         {             set_cvar_num("amx_blah_cvar",1)             console_print(id,"[AMXX] Blah enabled")         }         case 1:         {             set_cvar_num("amx_blah_cvar",0)             console_print(id,"[AMXX] Blah disabled")         }     }         return PLUGIN_HANDLED }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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 00:21.


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