Client_death and round_end
I have a plugin that gives money to killer via client_death event. Other plugin checks money @ round_end event. But if is killed last player, round_end happens before client_death, so money isn't counted correctly. So the question is - should I use set_task in round_end or should I use other funcion to determine if player was killed and give him the money which happens before round_end?
EDIT: Or, could you tell me how long does new round starts after round_end is called? Because found new bug. |
Re: Client_death and round_end
You can use HLTV event (search for VEN tutorial), it happens 5.0 seconds after round end on normal ends, and 3.0 seconds after Game Commencing event.
|
Re: Client_death and round_end
I've tried using HLTV event, but I cant give money with. Thx for the seconds.
|
Re: Client_death and round_end
Sure you can, write what you want to do, show your code.
|
Re: Client_death and round_end
PHP Code:
|
Re: Client_death and round_end
Use HLTV event to store players money.
Block Money message from there. Hook PlaybackEvent from HLTV event. When PlaybackEvent is called, unhook it and unblock Money message, and set Players money to the value you want. HLTV is called at new round, before player spawns and before money is given. PlaybackEvent is called after that. |
Re: Client_death and round_end
Im new to all this, how do I hook it? And after that, unhook? Also, I blocked the money, how to unblock it?
|
Re: Client_death and round_end
un/register_forward
set_msg_block(gmsgMoney, BLOCK_NOT/BLOCK_SET) |
Re: Client_death and round_end
Quote:
|
Re: Client_death and round_end
Ok, I finally got it to work, thank you for your help.
One more question. I have HLTV event, for cycle with get_players to get all players, after cycle there is register_forward. Problem is that register_forward is being executed before the cycle has stopped. Thats what my debug showed me: PHP Code:
debug2 debug4 debug1 debug3 Why is that? |
| All times are GMT -4. The time now is 06:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.