Raised This Month: $ Target: $400
 0% 

Variable Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 07-10-2006 , 20:19   Re: Variable Help
Reply With Quote #1

o, i forgot to add the 6.2 second time delay till next round eh? GG for me.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 07-10-2006 , 20:20   Re: Variable Help
Reply With Quote #2

Code:
#include <amxmodx> #include <amxmisc> #include <fun> new bool:godmode[33] public plugin_init() {     register_plugin("Godmode Thingy","1.0","GHW_Chronic")     register_concmd("amx_pred","cmdforward",ADMIN_LEVEL_C,"<name> < 0=no more godmode 1=godmode this round 2=godmode forever >")     register_event("ResetHUD","newround","b") } public client_disconnect(id) {     godmode[id]=false } public cmdforward(id,level,cid) {     if(cmd_access(id,level,cid,3))     {         return PLUGIN_HANDLED     }     new arg1[32]     new arg2[8]     read_argv(1,arg1,31)     read_argv(2,arg2,7)     new target=cmd_target(id,arg1,3)     if(!target)     {         return PLUGIN_HANDLED     }     new name[32]     get_user_name(target,name,31)     if(str_to_num(arg2)==0)     {         console_print(id,"[AMXX] Took %s's godmode",name)         client_print(target,print_chat,"[AMXX] An admin has taken your godmode.")         godmode[id]=false         set_user_godmode(target,0)     }     else if(str_to_num(arg2)==1)     {         client_print(target,print_chat,"[AMXX] An admin has given you godmode for this round.")         console_print(id,"[AMXX] Gave %s godmode for this round",name)         godmode[id]=false         set_user_godmode(target,1)     }     else if(str_to_num(arg2)==2)     {         client_print(target,print_chat,"[AMXX] An admin has given you godmode that lasts forever.")         console_print(id,"[AMXX] Gave %s godmode forever",name)         godmode[id]=true         set_user_godmode(target,1)     }     else     {         console_print(id,"amx_pred <name> <0=no more godmode 1=godmode this round 2=godmode forever>")     }     return PLUGIN_HANDLED } public newround(id) {     if(godmode[id])     {         set_task(0.2,"newround2",id)     } } public newround2(id) {     set_user_godmode(id,1) }
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
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 07:58.


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