vehcile blowing up
#1

when a vehicle has reached its damaged limit, and then sets on fire .

what i want to no is how do i stop it from blowing up and killing player , i would like it so when its at damage limit it just turns off and engine wont run until vehicle is repaired , its for trucking server so dont want everyones vehicles blowing up so they cant finish there mission, and i am using assistance script so if no cars break down =no jobs for assistance

all help apreciated
Reply
#2

pawn Код:
SetTimer("CarWrecked", 1000, true);
forward CarWrecked();
public CarWrecked()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        new Float:VehHealth;
        new PlayerVehicle;
        PlayerVehicle = GetPlayerVehicleID(i);
        GetVehicleHealth(PlayerVehicle, VehHealth);
        if(IsPlayerInAnyVehicle(i))
        {
            if( VehHealth < 350 )
            {
                SetVehicleHealth(i, 350);
                new engine,lights,alarm,doors,bonnet,boot,objective;
                GetVehicleParamsEx(PlayerVehicle,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(PlayerVehicle,0,lights,alarm,doors,bonnet,boot,objective);
            }
        }

    }
    return 1;
}
Maybe something like this. Not sure if it gives errors, if its gonna work: tell me if not
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)