- Katılım
- 4 yıl 1 ay 27 gün
- Mesajlar
- 112
Linkleri,görmek için
Giriş yap veya üye ol.

TR / EN: Gerçekçi ve Gelişmiş Yakıt Tüketimi Sistemi
[




Bu script, FiveM sunucularında araçların gerçekçi şekilde yakıt tüketmesini sağlayan, dinamik hesaplamalarla çalışan bir sistemdir. Araç hızı, ağırlığı, modifikasyonları ve motor tipi gibi birçok parametreyi dikkate alır.

Kod:
GetFuel(netID)
Kod:
local netID = VehToNet(GetVehiclePedIsIn(PlayerPedId(), false))
local fuel = exports["dms-fuel_system"]:GetFuel(netID)
print("Yakıt miktarı: ", fuel)
Kod:
SetFuel(netID, amount)
Kod:
local amount = 100
local netID = VehToNet(GetVehiclePedIsIn(PlayerPedId(), false))
exports["dms-fuel_system"]:SetFuel(netID, amount)
Kod:
GetMaxFuelCapacity(netID)
Kod:
local netID = VehToNet(GetVehiclePedIsIn(PlayerPedId(), false))
local capacity = exports["dms-fuel_system"]:GetMaxFuelCapacity(netID)
print("Depo kapasitesi: ", capacity)

Etken | Yaklaşık Etki | Açıklama |
---|---|---|
![]() | %20 - %30 | Hız arttıkça tüketim artar |
![]() | %20 - %30 | Yüksek devirde daha fazla tüketim |
![]() | %5 - %10 | Ağır araçlar daha fazla tüketir |
![]() | ~%8 artış | Her mod seviyesi %2–3 artırır |
![]() | ~%5 artış | Performansa göre artış sağlar |
![]() | %10 artış | Turbo açıkken yakıt artar |
![]() | %4’e kadar azalma | Sürtünme azaltılır |
![]() | ~%30 daha verimli | Ayrı formül ile hesaplanır |

- - Gerçekçi ve detaylı tüketim algoritması
- - Elektrikli araçlara özel destek
- - Araç modifikasyonlarına duyarlı
- - Export destekli ve kolay entegre edilir
- - Performans dostu veri takibi

- - Doldurma arayüzü bu scriptte dahil değildir
- - Yakıt türleri (benzin/dizel) ayrımı henüz yok
- - Kalıcılık (MySQL) eklentisi opsiyoneldir

- - HUD'u GetFuel ile bağlayarak gerçek zamanlı yakıt göstergesi oluşturabilirsiniz.
- - SetFuel fonksiyonunu benzin istasyonu scriptlerinde kullanarak yakıt doldurma işlemini gerçekleştirebilirsiniz.
- - GetMaxFuelCapacity fonksiyonu, araçların deposunu fazla doldurmayı önlemede yardımcı olur.


This script brings dynamic and realistic fuel consumption to your FiveM server. It calculates consumption based on vehicle speed, engine RPM, upgrades, weight, and type. It also includes support for electric vehicles.

Kod:
GetFuel(netID)
Kod:
local netID = VehToNet(GetVehiclePedIsIn(PlayerPedId(), false))
local fuel = exports["dms-fuel_system"]:GetFuel(netID)
print("Fuel level: ", fuel)
Kod:
SetFuel(netID, amount)
Kod:
local amount = 100
local netID = VehToNet(GetVehiclePedIsIn(PlayerPedId(), false))
exports["dms-fuel_system"]:SetFuel(netID, amount)
Kod:
GetMaxFuelCapacity(netID)
Kod:
local netID = VehToNet(GetVehiclePedIsIn(PlayerPedId(), false))
local capacity = exports["dms-fuel_system"]:GetMaxFuelCapacity(netID)
print("Tank capacity: ", capacity)

Factor | Approx. Impact | Description |
---|---|---|
![]() | %20 - %30 | More speed = more fuel used |
![]() | %20 - %30 | Higher RPM = more fuel |
![]() | %5 - %10 | Heavier = more consumption |
![]() | ~%8 artış | Each level increases 2–3% |
![]() | ~%5 artış | Slight increase |
![]() | %10 artış | Turbo causes extra consumption |
![]() | %4’e kadar azalma | Can reduce consumption |
![]() | ~%30 daha verimli | Uses separate formula |

- - Realistic and advanced fuel consumption
- - Electric vehicle support
- - Upgrade-sensitive logic
- - Fully exportable and integrable
- - Lightweight and optimized for performance

- - No fuel UI or refill interface (can be integrated)
- - No gasoline/diesel type distinction yet
- - Optional MySQL integration (can be added)

- - Connect HUD to `GetFuel` for real-time display
- - Use `SetFuel` in gas station scripts
- - `GetMaxFuelCapacity` helps prevent overfilling

MIT — Free to use, modify, and distribute. Credit is appreciated but not required.

Issues and pull requests are welcome. Let’s improve this together!
Script by
Linkleri,görmek için
Giriş yap veya üye ol.

Son düzenleme: