Car tottaled system
#1

I have a RP server and it dosent have system that when the car is heavy damaged it say car totaled , Can someone give me a FS or tell me how to do it ?
Reply
#2

Код:
public OnVehicleDamageStatusUpdate(vehicleid,playerid)
{
	if(GetVehicleHealth(vehicleid) < 400)
	{
		SetVehicleParamsEx(vehicleid,0,0,0,0,0,0,0); //Turns Engine and Lights off.
		SendClientMessage(playerid,0xFF0000FF,"Your vehicle is totally damaged, it wont work from now on.");
	}
	return 1;
}
That's for a crash etc. of course, just showing you an example.
Reply
#3

Thanks for help
Reply
#4

OnVehicleDamageStatusUpdate() is not reliable for this.

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

"This callback is called when a vehicle element such as doors, tires, panels, or lights get damaged."

It might not always been called when you need it but there are other ways.

This seems like a job for a timer and foreach() with a custom iterator.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)