Posts: 106
Threads: 9
Joined: Oct 2011
Reputation:
0
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.
Posts: 106
Threads: 9
Joined: Oct 2011
Reputation:
0
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).
Posts: 1,599
Threads: 164
Joined: Dec 2010
Reputation:
0
I am not really sure there is a way to get that.. Maybe some include about where player is aiming at..
Posts: 106
Threads: 9
Joined: Oct 2011
Reputation:
0
hm yeah, something with aiming vector and getvehicleinfo for size maybe
Posts: 106
Threads: 9
Joined: Oct 2011
Reputation:
0
atm i'm only writing, because can't try making it (some problems with pc).