Detecting vehicle damager
#1

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.
Reply
#2

bump
Reply
#3

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

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

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).
Reply
#5

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

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

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.
Reply
#8

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

is this what you are looking for?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)