Reset buttons at round start
4 Attachment(s)
Reset buttons At round start By xPaw .: Description :. This plugin was mainly done for deathrun servers, did you had situation when you are terrorist and pressing button, then cts die, and in new round the button is still red? this plugin is for you, it makes all buttons to be usable at new round aka resets buttons / makes them green. |
Re: Reset buttons at round start
You could start at max_clients + 1.
Btw : Quote:
|
Re: Reset buttons at round start
Nice, but I was wondering, can you also make a plugin that sets a delay for all buttons that you have pressed, something like 20 seconds or so? The reason why I am asking is because there are some maps like deathrun_projetocs2 where the terrorists like to make abuse of the buttons. Thanks in advance if you can help.
|
Re: Reset buttons at round start
starting at gMaxplayers or gMaxplayers+1 is crap, no matter which way you use... you have to set the iButton var although you dont have to + you use an operator, i hope you see why its crap.
tbh, both of you should have seen several plugin which search for an entity by a given classname by find_ent_by_* or EngFunc_FindEntityByString. did you ever see someone setting the startvalue to gMaxplayers? PHP Code:
|
Re: Reset buttons at round start
If the buttons are static, hook their spawn (in plugin_precache) and group them in a dynamic array.
Edit: The code: PHP Code:
|
Re: Reset buttons at round start
Quote:
|
Re: Reset buttons at round start
Quote:
|
Re: Reset buttons at round start
i know taht mine is better, i also thought about caching but i dont think that its really necessarry although it is for sure an optimization.
since you already posted the code, xPaw should use it ^^ |
Re: Reset buttons at round start
Quote:
|
Re: Reset buttons at round start
usually iButton holds the id of your latest func_button which got found == you are right. if you pass maxplayers maxplayers+1 will be the first id to be checked (even though im not sure whether the searching natives check ent by ent).
|
All times are GMT -4. The time now is 21:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.