Raised This Month: $ Target: $400
 0% 

Allow only every new round execute


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
killergirl
Senior Member
Join Date: Jul 2010
Old 10-19-2010 , 08:33   Allow only every new round execute
Reply With Quote #1

I have an idea to make a script with additional functions but I need help about "time interval". I've tried to make with "client_putinserver", with "Ham_Spawn", with "set_task", etc., with no success.
The script allows to execute the command only in the first 15 seconds, the beginning of a new round or when the server gets the command, automatically executes the command after when the round ends or when a new round starts.
killergirl is offline
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
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-19-2010 , 18:19   Re: Allow only every new round execute
Reply With Quote #3

You may need to better describe what you are trying to do.
__________________
fysiks is offline
killergirl
Senior Member
Join Date: Jul 2010
Old 10-20-2010 , 11:37   Re: Allow only every new round execute
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
You may need to better describe what you are trying to do.
For example: amx_blind .

I was wonderig, to execute amx_blind only int the first 15 seconds of a round, not a map! Because everyday I've got reclamations from other players because they've got banned for no reasons. The admin is so foolish and he executes the command anytime, anywhere, in the middle of the game when the victim is killing enemies.

And the second is with another command, but included amx_blind. This script will work with ex: /report <name of player> and the server will execute the command if there is no admin online or when the clock is 00:00 or the suspect will reach a number of kills.
killergirl is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-20-2010 , 13:15   Re: Allow only every new round execute
Reply With Quote #5

Quote:
Originally Posted by killergirl View Post
For example: amx_blind .

I was wonderig, to execute amx_blind only int the first 15 seconds of a round, not a map! Because everyday I've got reclamations from other players because they've got banned for no reasons. The admin is so foolish and he executes the command anytime, anywhere, in the middle of the game when the victim is killing enemies.
You explaination is still confusing imo. You want to allow an admin to use a command only in the first 15 seconds of a round?

Quote:
Originally Posted by killergirl View Post
And the second is with another command, but included amx_blind. This script will work with ex: /report <name of player> and the server will execute the command if there is no admin online or when the clock is 00:00 or the suspect will reach a number of kills.
"when the clock is 00:00"?? What? Isn't the game over at 00:00?
__________________
fysiks is offline
killergirl
Senior Member
Join Date: Jul 2010
Old 10-20-2010 , 14:52   Re: Allow only every new round execute
Reply With Quote #6

Quote:
You explaination is still confusing imo. You want to allow an admin to use a command only in the first 15 seconds of a round?
Yes.

Quote:
"when the clock is 00:00"?? What? Isn't the game over at 00:00?
After 00:00 AM.
Just forget this proposition. I can't explain how my brain want's to works, just forget this.

hleV
Thank you for reply and for idea how to start the plugin.
killergirl is offline
Reply



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