Author Topic: Very advanced fuel system  (Read 155 times)

David_Armano

  • Newbie
  • *
  • Posts: 13
  • Reputation 0
    • View Profile
Very advanced fuel system
« on: November 15, 2011, 08:31:06 pm »
hey all,
i found a nice fuel system it's better then the 1 now please aad it it's with all gass from IRL with different prices ;)

here is the link: http://forum.sa-mp.com/showthread.php?t=93756

Share on Bluesky Share on Facebook


David_Armano

  • Newbie
  • *
  • Posts: 13
  • Reputation 0
    • View Profile
Re: Very advanced fuel system
« Reply #1 on: November 17, 2011, 07:53:49 pm »
.:: "Advanced" Fuel System ::.
Originally made on 26th August 2009, now back in business. Edited, fixed, tuned.
Well, I was really bored last days, so I downloaded pawno (after two years!) and started browsing new SAMP functions... Then I realized that my last FS doesn't work that great at all, and also I wanted to suggest a fuel system for LS:RP, so I started coding.

 


The second screenshot shows you how it looks when you enter a gas station. That means ANY gas station, as I (back in 2009) got step by step ALL gas stations positions. Simply, when you enter area of any gas station in San Andreas, this text will be shown informing that you can refill your gas tank here.

The third screenshot is showing how does it look when the gas stank is being refilled. The game text is updating every moment and shows how full the gas tank already is.


 

And the last screenshot shows what happens when you refill your vehicle's gas tank with wrong type of gas.

Simply described, I've put all cars into five categories:
Old cars - using old and soft gas - Natural 95
Trucks - using Naphtha (diesel fuel)
Fast cars - using strong gas for strong engines - Super 2000
Bikes - using soft gas - also Natural 95
Other cars - using normal (ordinary) gas - Natural 98

You have to choose the right gas to not damage your engine. If you choose wrong gas, your car might get damaged. This depends on random variable - there is 30% chance every time the timer gets started that your vehicle engine will be damaged, and it depends only on luck when will the engine get damaged.
Getting damaged means that your vehicle's HP will be set to 300 (300/1000).

Gas prices are listed in $X per liter, that means each % of fuel costs you $X.




The whole fuel system, even refilling is RPed, which means that every gas station has it's own personal - Gas station service. Gas station service is RPed alike to Toll guards, only Gas station service has different types of personal (random type of speech - "Yo man", "Hello sir", "Hey guy", etc.).




Once the refilling is started, a 3D Text informing others that vehicle is being refilled will be shown above the vehicle. Just for information, nothing important.




When the refilling is done, you will be informed.




You will be also informed when the engine is damaged due to refilling the vehicle with wrong type of gas.
WARNING! The variable containing information about wrong gas is saved to VEHICLE, not to PLAYER. That means when you refill the vehicle with wrong gas and exit the car recently, another player who enter it will get the information about car damage later.




And finally - when you don't have enough money to pay, you will get just simply informed about it, nothing deeper.




You can, of course, edit the gas prices, simply straight in .pwn code:

Code:
#define GASPRICE_NATURAL95  220 // <= The number is price for 3-5 (random) percent of fuel
#define GASPRICE_NATURAL98  250
#define GASPRICE_DIESEL     200
#define GASPRICE_SUPER2000  300
and also the time to get fuel down:
Code:
#define FUEL_TIME           11 // Seconds
There are lots of functions, everything works fine, just try it.

Commands: /refill, /exit

What about download...?
http://uploading.com/files/2c67b9fb/AdvancedFuelSystem.tar/

Hellman

  • Administrator
  • Newbie
  • *****
  • Posts: 21
  • Reputation 1
    • View Profile
Re: Very advanced fuel system
« Reply #2 on: November 19, 2011, 06:20:12 am »
We change to new sricpt so we have good gas system there :D