Raised This Month: $ Target: $400
 0% 

How do I get the HLTV not be kicked?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 10-04-2011 , 21:37   How do I get the HLTV not be kicked?
Reply With Quote #1

Hello, I have a PUG server, and who fails. Minutor is ready in a kicked. But also the HLTV is being kicked. Any solution?

PHP Code:
#include <amxmodx>

#define TIME_TILL_KICK    2

new bool:IsReady[33]

new 
pcvarToggle

public plugin_init()
{    
    
register_clcmd("say .ready""ReadyUser")
    
register_clcmd("say .notready""NotReadyUser")
    
    
pcvarToggle register_cvar("ready_toggle""1")
}

public 
ReadyUser(id)
{
    if(
get_pcvar_num(pcvarToggle))
    {
        
IsReady[id] = true
        remove_task
(id)
    }
}

public 
NotReadyUser(id)
{
    if(
IsReady[id] && get_pcvar_num(pcvarToggle))
    {
        
IsReady[id] = false
        remove_task
(id)
        
        
InformUser(id)
    }
}

public 
client_putinserver(id)
{
    if(
get_pcvar_num(pcvarToggle))
    {
        
IsReady[id] = false
        
        set_task
(20.0"InformUser"id)
    }
}

public 
InformUser(id)
{
    if(
get_pcvar_num(pcvarToggle))
    {
        
client_print(idprint_chat"You have %i minutes to type .ready"TIME_TILL_KICK)
        
        
set_task(float(TIME_TILL_KICK*60), "KickUser"id)
    }
}

public 
KickUser(id)
{
    if(!
IsReady[id] && get_pcvar_num(pcvarToggle))
    {
        new 
AuthID[34]
        
get_user_authid(idAuthID33)
        
        
server_cmd("amx_kick ^"%s^" ^"You did not type .ready in 2 minutes^""AuthID)
    }

__________________
kramesa 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 19:34.


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