[FilterScript] Fuel System
#1


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

Reply
#2

Nice job.
Reply
#3

remove job, please
Reply
#4

I was thinking the same thing,but i have something better in mind.
Reply
#5

Quote:
Originally Posted by Phar
View Post
I was thinking the same thing,but i have something better in mind.
Link?
Reply
#6

Quote:
Originally Posted by ask187
View Post
Link?
No? its for my server why would i give it away?
Reply
#7

Quote:
Originally Posted by Phar
View Post
No? its for my server why would i give it away?
Do you have skype?
Reply
#8

Quote:
Originally Posted by ask187
View Post
Do you have skype?
Yeah,why?
Reply
#9

Nice script.
Reply
#10

Quote:
Originally Posted by Phar
View Post
Yeah,why?
let's be friends?
Reply
#11

Quote:
Originally Posted by ask187
View Post
let's be friends?
Hmm... Pm me and stop posting on rootcause topic... instead
Reply
#12

Quote:
Originally Posted by Phar
View Post
Hmm... Pm me and stop posting on rootcause topic... instead
what?
Reply
#13

Nice script man Rep +
Reply
#14

Why Not Using Save Fuel ?
Anyway Good
Reply
#15

Good job
Reply
#16

It's ok, Good Work. Keep improving it.
I won't say it's very good as it could be better.

@ask187 - stop the spam, there's something called Private Message where you can say whatever you want to anyone.
Reply
#17

Why is my pawno crashing when I try to compile it?
Reply
#18

Sorry to late reply, but i have problem in this script. I can't press N to start engine why ?
Reply
#19

Nice Script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)