Skip to content

Open-GTO/zvehhealth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

zvehhealth

Vehicle on change health callback

Provides callbacks

forward OnVehicleHealthChanged(vehicleid, Float:oldhealth, Float:newhealth, bool:scriptcall);

scriptcall = true if vehicle health changed by SetVehicleHealth or RepairVehicle functions.

Provides constants

ZVEHHEALTH_TICKRATE 300

Usage

public OnVehicleHealthChanged(vehicleid, Float:oldhealth, Float:newhealth, bool:scriptcall)
{
	if (scriptcall) {
		printf("Vehicle health has been changed (SetVehicleHealth, RepairVehicle).");
	} else {
		printf("Vehicle health has been changed (crashed).");
	}

	printf("Vehicleid: %d. Old: %f, new: %f.", vehicleid, oldhealth, newhealth);
}

About

Vehicle on change health callback

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages