Raised This Month: $ Target: $400
 0% 

Anti-specbug


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 11-23-2009 , 15:29   Anti-specbug
Reply With Quote #1

I tried to post this as a plugin, but I failed because it would not work. I ask - why?
PHP Code:
#include <amxmodx>
#include <cstrike>

#define PLUGIN "auto kill & ban spec buggers"
#define VERSION "1.0"
#define AUTHOR "backstabnoob"

new cvar_Timecvar_useAmxBanscvar_Bancvar_Slay

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
set_task(1.0"cmdKillBanSpectators")
    
cvar_Time register_cvar("specbug_time""10080")
    
cvar_useAmxBans register_cvar("specbug_amxbans""1")
    
cvar_Ban register_cvar("specbug_ban""1")
    
cvar_Slay register_cvar("specbug_slay""1")
}

public 
cmdKillBanSpectators(id) {
    if(
cs_get_user_team(id) == CS_TEAM_SPECTATOR && is_user_alive(id)) {
        new 
Userid get_user_userid(id)
        new 
Authid[29]
        
get_user_authid(idAuthid28)
        if(
cvar_Slay == 1) {
            
user_kill(id)
        }
        if(
cvar_Ban == 1) {
            if(
cvar_useAmxBans == 1) {
                
server_cmd("amx_ban %d %s Specbug"cvar_TimeAuthid)
                } else {
                
server_cmd("kick #%d Specbug",Userid)
                
server_cmd("banid %d %s"cvar_TimeAuthid)
                
server_cmd("writeid")
            }
        }
        
    }
    
set_task(1.0"cmdKillBanSpectators")

Backstabnoob is offline
 



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 13:42.


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