Пример #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="vehicle"></param>
 /// <returns></returns>
 public float GetVehicleConsume(Vehicle vehicle)
 {
     if (vehicle != null)
     {
         if (VehiclesPetrolTanks.HasConsum(vehicle))
         {
             return(VehiclesPetrolTanks.GetConsum(vehicle));
         }
         else
         {
             API.sendChatMessageToAll("Fahrzeug noch nicht eingetragen für Consum.");
             return(5f);
         }
     }
     API.sendChatMessageToAll("Fahrzeug noch nicht eingetragen für Consum.");
     return(5f);
 }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="vehicle"></param>
        /// <returns></returns>
        public float VehicleMaxFuelLevel(Vehicle vehicle)
        {
            if (vehicle != null)
            {
                if (VehiclesPetrolTanks.Has(vehicle))
                {
                    //API.sendChatMessageToAll("Fuel from list: "+ VehiclesPetrolTanks.Get(vehicle));
                    return(VehiclesPetrolTanks.Get(vehicle));
                }
                else
                {
                    return(65f);
                }
            }


            return(65f);
        }