0.3z car wheel not burst
#1

0.3z version car empty car wheel not burst
Reply
#2

This is nothing new. You could never do this. You can script this with 0.3z's OnPlayerWeaponShot now though.
Reply
#3

car wheel not burst
Reply
#4

Any form of damage done to an unoccupied vehicle will not affect the vehicle health.

BTW:Is there any I can burst them manually by code?Was thinking of making air filling system for the wheels?
Reply
#5

You mean pop vehicle tyre?

pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    switch(hittype)
    {
        case BULLET_HIT_TYPE_VEHICLE:
        {
            /*new Float:X, Float:Y, Float:Z;
            GetVehicleModelInfo(hitid, VEHICLE_MODEL_INFO_PETROLCAP, X, Y, Z);*/

                                       
            new Float:Offset[6];
            GetVehicleModelInfo(hitid, VEHICLE_MODEL_INFO_WHEELSFRONT, Offset[0], Offset[1], Offset[2]);
            GetVehicleModelInfo(hitid, VEHICLE_MODEL_INFO_WHEELSREAR,  Offset[3], Offset[4], Offset[5]);

            if(fX == Offset[0] && fY == Offset[1] && fZ == Offset[2]) // Around shooted offsets (to do)
            {
                PopVehicleTire(hitid, 10);
            }

            else if(fX == Offset[3] && fY == Offset[4] && fZ == Offset[5]) // Around shooted offsets (to do)
            {
                PopVehicleTire(hitid, 5);
            }
        }
    }
    return 1;
}

stock PopVehicleTire(vehicleid, tire)
{
    static panels, doors, lights, tires;
    GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
    UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tire);
}
That's what I've made so far, but I don't have time to finish it, because College and work are calling me. You can edit it, if you want. For now that function checks both front & rear wheels positions, but it's not possible to shoot them, because your position must be EXACTLY the same as wheels position. Just make a range of shooted position, and check is it around wheels.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)