View Single Post
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 04-16-2013 , 12:43   Re: AMX Mod X 1.8.2 for 2013 HLDS Update
Reply With Quote #181

Hey, i have a issue with jointeam or chooseteam command:

If someone try to bypassing flooding or spamming the command is not blocking a command, like this function:

Ps.
I have tested with menus hooking (VGUI and old style menus) and this code above.

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

new g_Lock;

public 
plugin_init()
{
    
register_plugin("Generic Plugin Test",AMXX_VERSION_STR,"AMXX Dev Team");
    
    
g_Lock register_cvar("amx_lock_teams","1");
    
    
register_clcmd("chooseteam","cmdHook");
    
register_clcmd("jointeam","cmdHook");
}

public 
cmdHook(id)
{
    if(
get_pcvar_num(g_Lock))
    {
        
console_print(id,"Sorry, change teams not allowed at this time!");
        
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;

__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY