07.06.2015, 09:49
Quote:
You can detect if a player is spraying by checking the keys he is pressing.
You can use these callbacks/functions to find out what keys are being pressed:
OnPlayerKeyStateChange
GetPlayerKeys
The player has to press KEY_FIRE to spray water.
You can then find out in which direction he is facing using GetPlayerFacingAngle.You can then create a virtual sphere around your point and find out if the line drawn along the direction of facing angle of the player intersects the point or passes close to the point by doing some simple math.
https://sampforum.blast.hk/showthread.php?tid=573385
You can get an idea how to do the math from here.


