Ignoring (id) from a command
This is for the Deathrace Mod. Original code, it executes user_silentkill to kill all the players when someone wins the round (the mod it's played only as a Counter-Terrorist), but i founded the Round Terminator plugin wich can make the round terminate without killing all the players. The problem is, how to ignore the player who wins the deathrace (Pressing the finish button, last man alive) so the command user_silentkill will have effect only the rest of the players? Heres the part of the code wich i'm talking about:
PHP Code:
|
Re: Ignoring (id) from a command
Make the function something like this:
PHP Code:
Editing messed up indent. I'm too lazy to fix that. |
Re: Ignoring (id) from a command
PHP Code:
|
Re: Ignoring (id) from a command
@DarkGod - Wasn't working... the players weren't killed when the button was pressed.
Thank you Exolent[jNr]. It works like a charm ! Just another little problem: How can i set a delay for the +use command (because i set the server_cmd ( "amx_roundterminate ct" ) when the button it's pressed... so if the player is pressing multiple times.. not only that a new round doesn't begin, but the server it's flooded. Thank you again Exolent :) |
Re: Ignoring (id) from a command
Just use a global variable to check if the button was pressed already.
At every round start, set it to false. Then when the button is pressed, check if it was pressed already. If the variable is false, do your round end stuff and set the variable to true. Otherwise, don't do anything. |
| All times are GMT -4. The time now is 03:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.