SA-MP Forums Archive
Detecting a player being shot, but not losing health. - 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: Detecting a player being shot, but not losing health. (/showthread.php?tid=403405)



Detecting a player being shot, but not losing health. - Chilco - 30.12.2012

This is basically what bothers me. If I try to detect a player being shot but not losing HP, the only appropiate callback I could think of is OnPlayerGiveDamage, however this is not synced. (Basically when you shoot someone on your screen without lagshoot, a player with a reasonably high ping doesn't see him getting hit at all) What I need is a way to check if someone gets hit but doesn't lose HP. OnPlayerTakeDamage is not an option, because this doesn't get called at all as the player doesn't lose HP.


Re: Detecting a player being shot, but not losing health. - ikbenremco - 30.12.2012

Try callback OnPlayerShootPlayer


Re: Detecting a player being shot, but not losing health. - Chilco - 30.12.2012

Quote:
Originally Posted by ikbenremco
Посмотреть сообщение
Try callback OnPlayerShootPlayer
Tried this one aswell and it also seems that it doesn't get called when no HP is lost.


Re: Detecting a player being shot, but not losing health. - iggy1 - 30.12.2012

I don't think there will be a way to detect it, if they don't take damage, at least not accurately. Before the callbacks OnPlayerTake/GiveDamage were implemented, it was difficult to detect if a player is being shot even if they lost health.

I would also be interested if someone knows of a way to do this accurately.


Re: Detecting a player being shot, but not losing health. - Chilco - 30.12.2012

It's probably not possible.


Re : Detecting a player being shot, but not losing health. - Khay - 30.12.2012

It's not possible but SAMP need a update for detect this cheat


Re: Detecting a player being shot, but not losing health. - Feastahashi - 30.12.2012

Yes, as they told, seems not possible. But if they update to detect this cheat, there will be a problem related to lag, since you shoot on another player and there not damage is taken from him.


Re : Detecting a player being shot, but not losing health. - Khay - 30.12.2012

If SAMP not help, it's not possible to detect this cheat. 2 years that i play and cheat us always bothered