OnPlayerWeaponShot not working - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerWeaponShot not working (
/showthread.php?tid=629236)
OnPlayerWeaponShot not working when hitting custom objects? -
Dokins - 22.02.2017
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
printf("Weapon fired %d", weaponid);
return 1;
}
It doesn't print if I shoot somewhere that is mapped, therefore I can't track player ammo accurately.
Re: OnPlayerWeaponShot not working -
GoldenLion - 22.02.2017
You must be shooting at a dynamic object then. Streamer has a separate callback for that:
Код:
OnPlayerShootDynamicObject(playerid, weaponid, STREAMER_TAG_OBJECT objectid, Float:x, Float:y, Float:z);
Re: OnPlayerWeaponShot not working -
Dokins - 22.02.2017
Literally just found this when you posted, thanks for the help.