Raised This Month: $ Target: $400
 0% 

Variable Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 07-10-2006 , 19:42   Re: Variable Help
Reply With Quote #3

Incase you don't know how to script and thus avalanche's response confused you, here is the full script:
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("SendAudio","newround","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw") } 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() {     for(new i=1;i<=get_maxplayers();i++)     {         if(godmode[i])         {             set_user_godmode(i,1)         }     } }

Last edited by GHW_Chronic; 07-10-2006 at 19:45.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
 



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