Thread: missed
View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-11-2010 , 05:39   Re: Block fullupdate
Reply With Quote #9

fullupdate cmd already has a cool down to prevent spam, player offset m_flNextFullUpdateTime is 614 (thanks arkshine) and cooldown is 0.6 sec, if you want to modify the cooldown, just play with this offset.

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define VERSION "0.0.1"
#define PLUGIN "FullUpdate Delay"

#define XO_PLAYER 5
#define m_flNextFullUpdateTime 614

new g_pCvarFullUpdateCoolDown

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
g_pCvarFullUpdateCoolDown register_cvar("amx_fullupdate_mindelay""1.5")

    
register_forward(FM_ClientCommand"ClientCommand_Post"true)
}

public 
ClientCommand_Post(id)
{
    new 
szCommand[12]
    if( 
equali(szCommand"fullupdate") )
    {
        
set_pdata_float(idm_flNextFullUpdateTimeget_gametime() + get_pcvar_float(g_pCvarFullUpdateCoolDown), XO_PLAYER)
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 09-11-2010 at 05:45.
ConnorMcLeod is offline