Vehicle Stall
#4

This should work properly.

pawn Код:
if(IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
            {
                new carid = GetPlayerVehicleID(i), string[128];
                new VehHealth;
                GetVehicleHealth(carid, VehHealth);                

                if(VehHealth <= 251.0)
                {
                    SetVehicleHealth(carid, 350.0);
                    format(string, sizeof(string), "** The vehicle engine stalls (( %s )).", GetName(i));
                    NearByMessage(i, SCRIPTPURPLE, string);
                    new engine,lights,alarm,doors,bonnet,boot,objective;
                    GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(carid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
                }
            }
Reply


Messages In This Thread
Vehicle Stall - by BornHuman - 16.01.2015, 01:17
Re: Vehicle Stall - by Abagail - 16.01.2015, 01:19
Re: Vehicle Stall - by BornHuman - 16.01.2015, 01:20
Re: Vehicle Stall - by Abagail - 16.01.2015, 01:22
Re: Vehicle Stall - by Threshold - 16.01.2015, 01:40
Re: Vehicle Stall - by Abagail - 16.01.2015, 01:42

Forum Jump:


Users browsing this thread: 3 Guest(s)