Weapon_ShootPosition get's called everytime a player fires a shot (and has ammo for it etc).
Since TF2 is missing a proper way to detect firing with TF2_CalcIsCritical requiring tf_weapon_criticals to be 1 and +ATTACK hooks fire even if the player has no weapons and therefore require lots of validity checks, hooking ShootPosition is probably one of the easier ways.
This plugin simply provides a forward whenever a client shoots a weapon.
Example Code:
PHP Code:
#include <sourcemod>
#include <tweaponshootposition>
public OnClientWeaponShootPosition(client, Float:position[3]) {
PrintToServer("%N is firing his weapon at %.2f %.2f %.2f", client, position[0], position[1], position[2]);
}
Attached Files
![Dołączona grafika](https://forums.alliedmods.net/images/attach/sp.gif)
![Dołączona grafika](https://forums.alliedmods.net/images/attach/inc.gif)
![Dołączona grafika](https://forums.alliedmods.net/images/attach/txt.gif)
Wyświetl pełny artykuł