block a command for a certain time
Hi all,
How to block a command for a certain time? For 5 or more seconds.. thanks PHP Code:
|
Re: block a command for a certain time
You would check a certain global variable whether or not the action related to the command should be executed. When blocking the command you would change the value of the global variable and set_task to change the global variable to it's original value.
|
Re: block a command for a certain time
For this kind of purpose (cooldown) it should be more efficient to do this..
PHP Code:
I recommend you use the id of the player to be respawned (Target) See http://forums.alliedmods.net/showthread.php?t=43049 (near the end of the first post) for more info.. |
Re: block a command for a certain time
That is very true, sir. But how is your array only 32 long? You should never use "function" as a function name, at least use PAWN-tags then.
|
Re: block a command for a certain time
Quote:
And the array size was just a stupid mistake. Thanks for pointing it out :) |
Re: block a command for a certain time
oh, warning 209 :D - ReviveFunction
|
Re: block a command for a certain time
You know, it would really help if you put those examples of how to use a cooldown into your actual code :P
PHP Code:
|
Re: block a command for a certain time
Elusive138, big thanks! Close
|
| All times are GMT -4. The time now is 02:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.