13.05.2016, 17:25
ok so i'm making a feature when a player is inside a Police car and getting shot, his health should freezes because the cop car is bullet proof in real life
how can i make that?
how can i make that?
SetVehicleHealth(vehicleid, 1000000);
public OnPlayerUpdate(playerid)
{
new vehicleId = GetPlayerVehicleID(playerid);
if(vehicleId == YOUR_POLICE_VEHICLE ID)
{
SetVehicleHealth(vehicleId, 1000);
}
}
// In OnPlayerWeaponShot:
if (hittype == BULLET_HIT_TYPE_PLAYER && 596 <= GetVehicleModel(GetPlayerVehicleID(hitid)) <= 599) return 0;