SA-MP Forums Archive
Detecting vehicle damager - 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 vehicle damager (/showthread.php?tid=370194)



Detecting vehicle damager - Kiets - 19.08.2012

Hi. Currently we can't detect with samp natives who is damaging the vehicle (i mean when someone shoots in it). I am 90% sure it can be made in scripting, just confused and don't know how to start. Maybe something with OnPlayerKeyStateChange to detect if player fires and with timer check vehicle health or something like that? Or maybe use onplayerupdate? I don't know, that's why i ask here, maybe someone already made this (would be awesome), or has ideas (i don't need the whole script, i can make it myself, just tips or something to start with. Thank you.


Re: Detecting vehicle damager - Kiets - 20.08.2012

bump


AW: Detecting vehicle damager - Mellnik - 20.08.2012

https://sampwiki.blast.hk/wiki/OnVehicleDamageStatusUpdate

playerid The ID of the player who synced the damage (who had the car damaged).


Re: Detecting vehicle damager - Kiets - 20.08.2012

first of all, this is called when a part of vehicle is broken, not only when the health is reduced. Second, playerid stands for vehicle driver (doesn't matter if someone shoots of driver just crashes, tested).


Re : Detecting vehicle damager - ricardo178 - 20.08.2012

I am not really sure there is a way to get that.. Maybe some include about where player is aiming at..


Re: Detecting vehicle damager - Kiets - 20.08.2012

hm yeah, something with aiming vector and getvehicleinfo for size maybe


Re : Detecting vehicle damager - ricardo178 - 20.08.2012

Than search for it, ******, use search function and get the part of codes you need, the ideas. Agreeing on here wont get it done man. Move, do it.


P.S. Don't Bump topics before 48 hours pass.


Re: Detecting vehicle damager - Kiets - 20.08.2012

atm i'm only writing, because can't try making it (some problems with pc).


Re: Detecting vehicle damager - Ranama - 20.08.2012

is this what you are looking for?