SA-MP Forums Archive
Bullet collision - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP DL Edition (https://sampforum.blast.hk/forumdisplay.php?fid=92)
+--- Forum: SA-MP 0.3.DL (https://sampforum.blast.hk/forumdisplay.php?fid=90)
+--- Thread: Bullet collision (/showthread.php?tid=653106)



Bullet collision - CodeStyle175 - 26.04.2018

When bullet collides with custom object then OnPlayerWeaponShot isn't called. Is there any fix or workaround?


Re: Bullet collision - Gammix - 26.04.2018

Hmm, i never knew that. Well you can use ColAndreas i guess.


Re: Bullet collision - ATomas - 27.04.2018

It works fine for me. Maybe you have a mistake in your code. Try this:

Code:
public OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,Float:fX,Float:fY,Float:fZ)
{
printf("playerid=%d,weaponid=%d,hittype=%d,hitid=%d,Float:fX=%f,Float:fY=%f,Float:fZ=%f",playerid,weaponid,hittype,hitid,fX,fY,fZ);
return 1;
}



Re: Bullet collision - CodeStyle175 - 27.04.2018

For me it won't be called when hitting custom object.
https://www.youtube.com/watch?v=_vvHbBw3IMM


Re: Bullet collision - raydx - 29.04.2018

Is it dynamic object? Check OnPlayerShotDynamicObject.