SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 31/01/2016, 07:44 PM   #1
rootcause
Big Clucker
 
rootcause's Avatar
 
Join Date: Feb 2015
Location: /
Posts: 114
Reputation: 197
Default 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


Last edited by rootcause; 05/07/2016 at 05:06 PM. Reason: video re-added
rootcause is offline   Reply With Quote
Old 31/01/2016, 07:50 PM   #2
ask187
Little Clucker
 
Join Date: Dec 2015
Posts: 13
Reputation: 0
Default Re: Fuel System

Nice job.
ask187 is offline   Reply With Quote
Old 31/01/2016, 08:04 PM   #3
ask187
Little Clucker
 
Join Date: Dec 2015
Posts: 13
Reputation: 0
Default Re: Fuel System

remove job, please
ask187 is offline   Reply With Quote
Old 31/01/2016, 09:14 PM   #4
Phar
Guest
 
Posts: n/a
Default Re: Fuel System

I was thinking the same thing,but i have something better in mind.
  Reply With Quote
Old 31/01/2016, 09:16 PM   #5
ask187
Little Clucker
 
Join Date: Dec 2015
Posts: 13
Reputation: 0
Default Re: Fuel System

Quote:
Originally Posted by Phar View Post
I was thinking the same thing,but i have something better in mind.
Link?
ask187 is offline   Reply With Quote
Old 31/01/2016, 09:20 PM   #6
Phar
Guest
 
Posts: n/a
Default Re: Fuel System

Quote:
Originally Posted by ask187 View Post
Link?
No? its for my server why would i give it away?
  Reply With Quote
Old 31/01/2016, 10:44 PM   #7
ask187
Little Clucker
 
Join Date: Dec 2015
Posts: 13
Reputation: 0
Default Re: Fuel System

Quote:
Originally Posted by Phar View Post
No? its for my server why would i give it away?

Do you have skype?
ask187 is offline   Reply With Quote
Old 31/01/2016, 10:58 PM   #8
Phar
Guest
 
Posts: n/a
Default Re: Fuel System

Quote:
Originally Posted by ask187 View Post
Do you have skype?
Yeah,why?
  Reply With Quote
Old 31/01/2016, 11:05 PM   #9
HaRdiiZin
Gangsta
 
HaRdiiZin's Avatar
 
Join Date: Jan 2015
Location: localhost/HaRdiiZin
Posts: 803
Reputation: 98
Default Respuesta: Fuel System

Nice script.
HaRdiiZin is offline   Reply With Quote
Old 31/01/2016, 11:06 PM   #10
ask187
Little Clucker
 
Join Date: Dec 2015
Posts: 13
Reputation: 0
Default Re: Fuel System

Quote:
Originally Posted by Phar View Post
Yeah,why?
let's be friends?
ask187 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fuel System - No Fuel Scottylad Scripting Help 3 31/10/2015 12:51 AM
[FilterScript] Speedometer + motor system + fuel system[zcmd]. Darknoobster Filterscripts 10 09/04/2015 09:43 PM
[FilterScript] Fuel System [Fuel/Speed/Vehicle Name/Health] reddromero Filterscripts 5 10/05/2014 02:50 AM
Custom Fuel system taking 2 fuel instead of 1. ricardo178 Scripting Help 6 27/04/2013 10:16 AM
Fuel System help arko123 Scripting Help 6 10/09/2012 04:54 PM


All times are GMT. The time now is 02:48 AM.


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