[Ajuda] Retirar play do veiculo ao acabar combustivel.
#6

Quote:
Originally Posted by ShutDown_
Посмотреть сообщение
pawn Код:
public CheckGas()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
           {
               if(GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsPlayerNPC(i))
               {
                   new vehicle = GetPlayerVehicleID(i);
                   new VehicleModel = GetVehicleModel(vehicle);
                   if(VehicleModel == 509 || VehicleModel == 481 || VehicleModel == 510)
                   {
                       return 1;
                   }
                if(Gas[vehicle] >= 1)
                   {
                       if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); }
                      Gas[vehicle]--;
                   }
                   else
                   {
                      NoFuel[i] = 1;
                      TogglePlayerControllable(i, 0);
                    GameTextForPlayer(i,"r~~n~~n~~n~~n~~n~~n~~n~~n~Sem combustivel~n~ ~b~Chame um mecanido para Re-abastecer ! ",1500,3);
                    RemovePlayerFromVehicle(i);
                    SendClientMessage(i, COLOR_YELLOW, "O motor do veнculo apagou por falta de combustнvel, Chame um mecвnico para ajudar.");
                }
            }
        }
    }
    return 1;
}
Obrigado Cara, + REP
Reply


Messages In This Thread
Retirar play do veiculo ao acabar combustivel. - by Petrick™ - 08.09.2012, 19:56
Re: Retirar play do veiculo ao acabar combustivel. - by Rhayziin - 08.09.2012, 20:00
Re: Retirar play do veiculo ao acabar combustivel. - by Petrick™ - 08.09.2012, 20:04
Re: Retirar play do veiculo ao acabar combustivel. - by Lucas-Fc - 08.09.2012, 20:06
Re: Retirar play do veiculo ao acabar combustivel. - by ShutDown_ - 08.09.2012, 20:12
Re: Retirar play do veiculo ao acabar combustivel. - by Petrick™ - 08.09.2012, 20:15

Forum Jump:


Users browsing this thread: 1 Guest(s)