SA-MP Forums Archive
samp OnVehicleDeath. - 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: samp OnVehicleDeath. (/showthread.php?tid=388953)



samp OnVehicleDeath. - budelis - 31.10.2012

Hi, why this callback:

OnVehicleDeath

Is not called when car explode him self? i have mean:

I spawn a lot of cars in one place, then them start explode but i don't get this message in console:

Код:
public OnVehicleDeath( vehicleid, killerid )
{
	printf("%d", vehicleid );
}
When i self explode car then all is well.


Re: samp OnVehicleDeath. - iJumbo - 31.10.2012

add return to this callback


Re: samp OnVehicleDeath. - budelis - 31.10.2012

I try to do that, but still nothing.


Re: samp OnVehicleDeath. - iJumbo - 31.10.2012

how you create the veh ?


Re: samp OnVehicleDeath. - Abhishek. - 31.10.2012

well sir each vehicle haves its own id so if gets called when the vehicle of specific id gets explode you can get the vehicle's id of a player by the function GetPlayerVehicleID(playerid)


Re: samp OnVehicleDeath. - JaKe Elite - 31.10.2012

How it suppose gonna work?

You mean like he will just put the function there and then all problem will be fix??

Well first of all OnVehicleDeath doesn't have playerid parameters.

Budelis what way you create the vehicle??


Re: samp OnVehicleDeath. - budelis - 31.10.2012

CreateVehicle.

When player spawn i create 5 cars in same coordinates.