SA-MP Forums Archive
[QUESTION] OnPlayerWeaponShot - 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: [QUESTION] OnPlayerWeaponShot (/showthread.php?tid=650654)



[QUESTION] OnPlayerWeaponShot - Davidmkd123 - 03.03.2018

Hello guys, i wanted to know how the weapon shoot when
player throws a grande is definated. Is it when the player
throw the bomb, or when the bomb explodes?


Re: [QUESTION] OnPlayerWeaponShot - Sew_Sumi - 03.03.2018

It's not too hard to have these in a test FS, and report all outputs to the RCON admin.

Someone should almost have done this already for testing things, and checking what will be fired, when.


Re: [QUESTION] OnPlayerWeaponShot - ISmokezU - 03.03.2018

This is a really good question, however, I mainly believe it is when the grenade is fired and not exploded. I mean you throwing a grenade and disconnecting would still count as you throwed it. But I’m only guessing, perhaps do a small test like Sew_Sumi mentioned above and correct it.


Re: [QUESTION] OnPlayerWeaponShot - Gammix - 04.03.2018

OnPlayerWeaponShot only reports you bullet weapons (no RPGs).

To detect if a player has thrown a grenade, OnPlayerKeyStateChange will be helpful. (Note: sometimes player press KEY_FIRE and switch weapon instantly can trigger false positive, hence the grenade is not thrown but callback occurs).