Killerid registration OnVehicleDeath
#8

Quote:
Originally Posted by Rizard
Посмотреть сообщение
Won't there just be an issue when let's say; 'Rustler fires upon other rustler until black smoke rises, then the attacking rustler flies of (flees the 'crime-scene') since he knows the vehicle (his victim rustler) will be death in seconds. Then when onvehicledeath is called the attacker is long gone and chances are he is no longer firing.
Hehe, right, that wont work correctly. This could be fixed by not only checking if a vehicle faces another one when it gets destroyed, but all the time, when a player fires. When a player in a weaponed vehicle presses the fire key, set up a timer that checks e.g. every 250ms if the vehicle faces another vehicle, and when the health of that attacked vehicle gets below a specific value, store the attacking player id in an array for all vehicle (to mark the vehicle as killed by that player). Then on OnVehicleDeath, check if that variable is set for the killed vehicle, and reset it at the end.
Ok, this is again more complex, and will use a higher amount of CPU, but this is the best solution i can think of spontaneously

(thats about a variation of a method i use to detect the killer of a player who killed him with fire of explosions, and not with the explosion itself, in one of my scripts )
Reply


Messages In This Thread
Killerid registration OnVehicleDeath - by Rizard - 23.05.2011, 12:51
Re: Killerid registration OnVehicleDeath - by Mauzen - 23.05.2011, 16:26
Re: Killerid registration OnVehicleDeath - by Rizard - 24.05.2011, 11:51
Re: Killerid registration OnVehicleDeath - by Sasino97 - 24.05.2011, 11:55
Re: Killerid registration OnVehicleDeath - by Rizard - 24.05.2011, 11:58
Re: Killerid registration OnVehicleDeath - by Mauzen - 24.05.2011, 11:59
Re: Killerid registration OnVehicleDeath - by Rizard - 24.05.2011, 12:05
Re: Killerid registration OnVehicleDeath - by Mauzen - 24.05.2011, 12:21
Re: Killerid registration OnVehicleDeath - by Rizard - 24.05.2011, 14:11
Re: Killerid registration OnVehicleDeath - by Rizard - 24.05.2011, 14:47

Forum Jump:


Users browsing this thread: 1 Guest(s)