01.04.2015, 15:57
Use this callback: https://sampwiki.blast.hk/wiki/OnVehicleDeath
Make use of per vehicle based vars to detect if was destroyed and do your stuff.
After storing the report, use this: https://sampwiki.blast.hk/wiki/OnVehicleSpawn
* You cant spawn a vehicle as destroyed.
Make use of per vehicle based vars to detect if was destroyed and do your stuff.
After storing the report, use this: https://sampwiki.blast.hk/wiki/OnVehicleSpawn
pawn Код:
new bool:died[MAX_VEHICLES];
public OnVehicleDeath(vehicleid, killerid)
{
died[vehicleid] = true;
return 1;
}
public OnVehicleSpawn(vehicleid)
{
if(died[vehicleid])
{
//Spawn it as locked with low Health
}
return 1;
}