Quote:
You could use the good old method of hooking attack (buttons) through prethink and check their current weapon
|
Player can press attack outside of bomb target so you have to check if player at the bomb target, if CurWeapon is C4, if in attack button, if old buttons not in attack. But even this will not tell you for sure. Player can be in the air. Et cetera.
Even if button is pressed this doesn't necessarily mean that the corresponding action occurs. So i can't agree that this method is "good", old - yes, but not that good.
Quote:
Only problem is that other 3rd prarty plugins can also invoke the progress bar.
|
In fact everything can be faked: messages, entities, models, animation, etc, so you can't be sure in any way.
But we don't care unless they use emessage system.
FYI: Even bomb_planting forward is use BarTime to catch bomb planting also, so emessage will mess with this forward also.
Basically the functionality of this forward is the same as hook
Code:
register_event("BarTime", "evBombPlantingStarted", "be", "1=3")
So we do not actually need an additional module in this case.
Quote:
Check the player's animation
|
This method isn't accurate enough.
Quote:
Catch when the bar is displayed on the screen - my only concern here is what if the player didn't complete planting it - I would have to reset the isPlayerPlanting variable - how do do this?
|
As shown in the Brad's code you have to check whether the first argument of BarTime message equal to zero.
Also here are the
CS Bomb Scripting FAQ/Tutorial