[HELP]Engine Breaking System
#1

Using this system https://sampforum.blast.hk/showthread.php?tid=152774

I want to do when the car has 300 hp car engine to stop, do not want him out of the car or give him freeze.

What I've tried so far:

pawn Код:
forward EngineBreak();
public EngineBreak()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
        if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
        {
            new Float:TempCarHealth;
            GetVehicleHealth(GetPlayerVehicleID(i), TempCarHealth);
            if(TempCarHealth <= 300.0)
            {
            new engine,lights,alarm,doors,bonnet,boot,objective;
            GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
             if(engine == 1)
             {
             if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
                {
                //SetVehicleHealth(GetPlayerVehicleID(i), 350.0);
                SendClientMessage(i, COLOR_RED, "The vehicle`s engine was broken. Call a mechanic");
                //RemovePlayerFromVehicle(i);
                TogglePlayerControllable(i, 0);
                    }
                 }
             }
         }
    }
}
Sorry for my english
Reply


Messages In This Thread
[HELP]Engine Breaking System - by Mititel - 03.08.2014, 19:34
Re: [HELP]Engine Breaking System - by Sawalha - 03.08.2014, 19:44
Re: [HELP]Engine Breaking System - by Mititel - 03.08.2014, 21:00
Re: [HELP]Engine Breaking System - by Dj_maryo1993 - 03.08.2014, 21:12
Re: [HELP]Engine Breaking System - by Mititel - 04.08.2014, 13:19
Re: [HELP]Engine Breaking System - by Mititel - 06.08.2014, 14:16
Re: [HELP]Engine Breaking System - by Sawalha - 06.08.2014, 14:28

Forum Jump:


Users browsing this thread: 1 Guest(s)