Raised This Month: $ Target: $400
 0% 

Allow only every new round execute


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-19-2010 , 09:50   Re: Allow only every new round execute
Reply With Quote #2

First 15 seconds of map?
PHP Code:
#include <amxmodx>
 
new bool:CommandCanBeExecuted;
new 
bool:CommandRequested;
 
public 
plugin_init()

        
register_clcmd("amx_command""AttemptToExecuteCommand");
 
        
register_event("HLTV""NewRound""a""1=0""2=0");
}
 
public 
DisallowExecutingCommand()
        
CommandCanBeExecuted false;
 
public 
AttemptToExecuteCommand(Client)
{
        if (
CommandCanBeExecuted)
                
CommandAccepted();
        else 
                
CommandRequested true;
 
        return 
PLUGIN_HANDLED;
}
 
public 
NewRound()
{        
        
set_task(15.0"DisallowExecutingCommand");
 
        if (
CommandRequested)
                
CommandAccepted();
}
 
CommandAccepted()
{
        
CommandRequested false;
 
        
// Stuff

__________________

Last edited by hleV; 10-20-2010 at 12:12.
hleV 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 10:17.


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