12.06.2017, 15:58
If I understand:
You need to make a variable like
Once you load the ambulance in your script set it to true with
and do the check onvehicledeath like
You need to make a variable like
PHP код:
//On top
new bool:IsAmbLoaded[MAX_VEHICLES];
PHP код:
IsAmbLoaded[vehicleid] = true; //The vehicleid is the ambulance
PHP код:
public OnVehicleDeath(vehicleid, killerid)
{
if(GetVehicleModel(vehicleid) == 416 && IsAmbLoaded[vehicleid] == true)
{
//Mission failed
IsAmbLoaded[vehicleid] = false; //Don't forget to reset the var to false after the mission end
}
}