SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Filterscripts (https://forum.sa-mp.com/forumdisplay.php?f=17)
-   -   [FilterScript] Fuel System (https://forum.sa-mp.com/showthread.php?t=599907)

rootcause 31/01/2016 08:44 PM

Fuel System
 

Commands

/refuel - Starts/stops refueling your vehicle, needs you to be near a gas pump.
/arefuel - Refuels the vehicle you're in, can be used anywhere. (RCON Only)
/arefuelall - Refuels all vehicles. (RCON Only)

Consumption Rate

This script uses vehicle mass, speed and distance the vehicle travelled since the last consumption. For example a Landstalker going max speed with 500 meters travelled should consume 0.974717 Liters of fuel. You can modify it from line 335.

No-Fuel Vehicles

You can add any vehicle model to the switch/case in Vehicle_IsANoFuelVehicle function and they'll be a no-fuel vehicle which means they won't get affected by this script. Bikes are no-fuel vehicles by default.

Gas Pumps

You can add/modify gas pump coordinates from PumpData array. Default coordinates are taken from GTA SA IPL files so pretty much every gas pump can be used to refuel.

Credits

Emmet_ for Extended vehicle functions
Vince for Extended Vehicle Information
[HLF]Southclaw for Progress Bars v2
Incognito for Streamer Plugin
Zeex for zcmd

Notes

You can use the LITRE_PRICE define to change litre price. (Default: 3)
You can use the UPDATE_RATE define to change the consumption time, needs to be in milliseconds. (Default: 1000)
Since there are no gas pumps for boats AFAIK, so you might have to map some and add their coordinates to the PumpData array or you can make boats no-fuel vehicles.

Downloads


ask187 31/01/2016 08:50 PM

Re: Fuel System
 
Nice job.

ask187 31/01/2016 09:04 PM

Re: Fuel System
 
remove job, please

Phar 31/01/2016 10:14 PM

Re: Fuel System
 
I was thinking the same thing,but i have something better in mind.

ask187 31/01/2016 10:16 PM

Re: Fuel System
 
Quote:

Originally Posted by Phar (Post 3650376)
I was thinking the same thing,but i have something better in mind.

Link?

Phar 31/01/2016 10:20 PM

Re: Fuel System
 
Quote:

Originally Posted by ask187 (Post 3650377)
Link?

No? its for my server why would i give it away?

ask187 31/01/2016 11:44 PM

Re: Fuel System
 
Quote:

Originally Posted by Phar (Post 3650380)
No? its for my server why would i give it away?


Do you have skype?

Phar 31/01/2016 11:58 PM

Re: Fuel System
 
Quote:

Originally Posted by ask187 (Post 3650419)
Do you have skype?

Yeah,why?

HaRdiiZin 01/02/2016 12:05 AM

Respuesta: Fuel System
 
Nice script.

ask187 01/02/2016 12:06 AM

Re: Fuel System
 
Quote:

Originally Posted by Phar (Post 3650422)
Yeah,why?

let's be friends?


All times are GMT. The time now is 09:40 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.