Author Topic: [Resolved] Fuel by Chique  (Read 14969 times)

Offline Chique

  • SAPD Leader
  • Honorable
  • *****
  • Posts: 1005
  • CHF-Chique[SAPD]
  • Registered: 15/08/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
[Resolved] Fuel by Chique
« on: 05 05, 2012, 09:55:00 am »
Topics regarding this subject earlier was only suggestions, without any actual script. I have been working on this script and testing it for nearly1 month, and finally making this topic to re-appear again. Since I am done making the script. Yes its original, by me.

Quick preface : In the last Fuel suggestion, JR10, Arran and Caz pointed out an issue that the script should not burn the bandwidth, and if it works fine, it could be added.

Testers : [CIT]Rick, [CIT]Pretface, UniOn, Fin_Jape, Vladimir, [CIT]ab-47, HellStunter, SmileFTW, DUDE, Lelouch, Timtso, gen.olo, Amon, Som3a, etc
and they reported it worked apparently fine. Thanks to JR10, since he proposed the semi-encryption and server side protocols to make the script quite invisible client-side, in case of cheating.



Idea :
Simple and straight, to implement a fuel system in our CIT.

Script is done and ready.



Features :

Simple and easy to tweak, as I have ensured that Fuel price, Specs, Fuel station locations can be changed with ease later on if needed. All tweak parameters are located at starting of the "server" type lua file.

  • GUI as well as Fuel Depletion and Monitoring are Client-sided, to ensure bandwidth. The topmost stack is speedometer, with a mix of sci-fi digital and analog combination. The needle turns white > sky > blue gradient with proportional to speed. The next stack consists of damage meter on left, which changes color as green > yellow > orange > red, whereas the right bar is the fuel meter. And the bottom most stack displays current zone name via GPS, and also shows if Engine is Off or On.
  • Fuel meter at the bottom of the screen. Indicates current fuel level of the vehicle. (Excludes planes, boats, etc). Also Staffs don't consume fuel. (to edit which teams don't consume, see server type file > "Exclude Team" array).
  • Initial fuel on buy a car is 10% so players can't abuse fuel system by selling a car and buying new one to get free fuel.
  • Fuel stations located evenly around the map, also blipped with a wheel (probably it resembles music CD) icon. Apart from existing fuel stations around SA, I have added a function which adds custom Fuel stations in places where there isn't a fuel station nearby. Example code -
  • [92]={1282,1422,11,true,90}
    it means a fuel station is added at the coordinate 1282,1422,11 and "true" means it would be blipped on map, and "90" means a fuel station (includes a car-shed type object and 2 non destroy-able pump objects) will be created at 90 rotation. if the 5th parameter is present, it will create the fuel station object, otherwise it will only create the fuel marker, i.e. in case of places where fuel station is already there.
  • Engine turn on / off with "z" key (key can be changed), or using "/engine" command. The engine must be turned off at time of refuelling like in real life.
  • Fuel costs reasonable, at 5$ per 1% fuel, can be changed of course. (to be made dynamic later).
  • Fuel is consumed when engine is turned on, and the car is travelling, and also even if the car is at idle mode it will consume the fuel as long as engine is turned on. Fuel consumption depends on : Engine state, Distance covered, Speed of vehicle. A 100% fuel will run your car for 1 hour approx at full speed (with default values of loss in script).
  • What if you are out of fuel in middle of road and the car engine stops? Just walk into a fuel station and buy fuel in can, can will hold maximum of 10%. Return to your car and use the fuel from can into your vehicle, and your car will make it to the nearest fuel station.


How does it work IG?

Player gets in a car. Immediately the fuel level meter shows up.
He drives to a nearby fuel station, enters inside the pump markers.
Turns off engine, presses and holds space bar, the fuel is refilled gradually upto 100% again.
he drives away.
After sometime...
Player : Oh no! I am out of fuel, and the car shut down in middle of the valley, how to get this thing moving? Shall I have to sell the car?
-- No, just walk into any fuel station, buy fuel in can, once you bought fuel you will get instructions on how to use the fuel in case of emergency.
Player buys some fuel in can using /buyfuel quantity.
He returns to his car and enters as driver, types /showfuel to check how much fuel he has in can.
He again turns off his engine , types /usefuel quantity again to refill the car from his can.



This explains nearly everything about the script I made.
Well from "Read Me", I am aware that I have to send the download script link, but where should I add it?
should include here? I should rather wait for Arran to approve this suggestion, and once approved I will send the download link to Arran.

To anyone who would like to test the script : Join "www.Chique" temporary server, to have a look at the CIT Fuel script and help in testing.
« Last Edit: 12 05, 2012, 10:38:51 pm by Arran »

CS Engineer | Web Developer | Philosopher | My Life in San Andreas

Offline Twist

  • New Community Member
  • *
  • Posts: 318
  • Nice game
  • Registered: 17/11/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Group: Islam
  • Ingame: xQcOWfan
Re: Fuel
« Reply #1 on: 05 05, 2012, 10:12:50 am »
wow Boss you really really did a great jop I agree with you that this should be added, some other people suggest this just saying "Add fuel to CIT", but you explained it all,so +1
Quote from: Fiwz *HoBoS 2016 founder*
There's too much pressure from the game because of these ABSURD RULES IMPOSED ON GROUPS. There's no difference in real life and in this game and sometimes pressure becomes too much to handle.

Offline Smile^

  • **
  • Posts: 41
  • Registered: 02/10/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Group: KLM
  • Ingame: Kennie
  • Squad: Õ_Õ
Re: Fuel
« Reply #2 on: 05 05, 2012, 10:33:56 am »
This idea is very nice and I think i'll be needed I was a people testing it and it very awesome xd so +1 from me.
Kennie [♥]

pretface

  • Guest
Re: Fuel
« Reply #3 on: 05 05, 2012, 10:50:56 am »
I tested this script, works good. Awesome script imo.

Offline Chique

  • SAPD Leader
  • Honorable
  • *****
  • Posts: 1005
  • CHF-Chique[SAPD]
  • Registered: 15/08/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Fuel
« Reply #4 on: 05 05, 2012, 10:55:17 am »
I tested this script, works good. Awesome script imo.

Appreciated, thanks.

CS Engineer | Web Developer | Philosopher | My Life in San Andreas

Offline Timtso

  • Regular Community Member
  • ***
  • Posts: 96
  • Chief Advisor of SAPD
  • Registered: 23/10/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Group: SAPD
  • Ingame: Timtso[SAPD]
Re: Fuel
« Reply #5 on: 05 05, 2012, 11:04:13 am »
I support this, you had some hardwork put into this script.

This way the criminals can't escape forever  >:D
Chief Advisor of San Andreas Police Department
Honorable Police Chief

Ex. Head Police Chief

Timtso

the_perfect_mostafa

  • Guest
Re: Fuel
« Reply #6 on: 05 05, 2012, 11:08:16 am »
I think CIT doesn't need a fuel system.
And this suggestion got rejected manytimes before.

Offline Timtso

  • Regular Community Member
  • ***
  • Posts: 96
  • Chief Advisor of SAPD
  • Registered: 23/10/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Group: SAPD
  • Ingame: Timtso[SAPD]
Re: Fuel
« Reply #7 on: 05 05, 2012, 11:09:14 am »
I think CIT doesn't need a fuel system.
And this suggestion got rejected manytimes before.

The suggestions then was like this: "I suggest to have fuel in CIT"
Chief Advisor of San Andreas Police Department
Honorable Police Chief

Ex. Head Police Chief

Timtso

Offline Chique

  • SAPD Leader
  • Honorable
  • *****
  • Posts: 1005
  • CHF-Chique[SAPD]
  • Registered: 15/08/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Fuel
« Reply #8 on: 05 05, 2012, 11:15:02 am »
I think CIT doesn't need a fuel system.
And this suggestion got rejected manytimes before.

Exactly this is the reply.

The suggestions then was like this: "I suggest to have fuel in CIT"

I am not suggesting, earlier suggestions were removed, since no optimized code was scripted, but public strongly opined in having the fuel system, even last fuel suggestion had +50 around votes.
I have tried my best to cook the code, and look at its features, and also solved various public opinions regarding don't want to pay for fuel, etc.
« Last Edit: 05 05, 2012, 11:18:13 am by Chique »

CS Engineer | Web Developer | Philosopher | My Life in San Andreas

Genkis

  • Guest
Re: Fuel
« Reply #9 on: 05 05, 2012, 12:22:20 pm »
Very nice idea! Finally someone who specifies his Idea! I hate it when there are
probably nice Ideas but you can not decide to vote on them because you can not
know in which way they really want to change things.

I have a additional idea for the fuel can. I think the way with all the commands is a bit
to complicated. If your car is empty on fuel, it should just be refilled by the 5% when
entering the car.
Even further I think mechanics should be able to refill your car also by 5% for a higher
price, but anyway I am planning to suggest some changes in mechanic job.

  ;D +1
« Last Edit: 05 05, 2012, 12:33:43 pm by Genkis »

Offline Chique

  • SAPD Leader
  • Honorable
  • *****
  • Posts: 1005
  • CHF-Chique[SAPD]
  • Registered: 15/08/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Fuel
« Reply #10 on: 05 05, 2012, 12:31:35 pm »
Very nice idea! Finally someone who specifies his Idea! I hate it when there are
probably nice Ideas but you can not decide to vote on them because you can not
know in which way they really want to change things.

I have a additional idea for the fuel can. I think the way with all the commands is a bit
to complicated. If your car is empty on fuel, it should just be refilled by the 5% when
entering the car.
Even further I think mechanics should be able to refill your car also by 5% for a higher
price, but anyway I am planning to suggest some changes in mechanic job.

  ;D

Commands are not at all complicated, since personally I hate commands too, I like GUI buttons more than just commands ;), but I strongly oversaw so that it would appear simple and easy to use, trust me, if you want to test, you can test it yourself as a demo too.

P.S. Don't forget to +1 or -1 on first post.

CS Engineer | Web Developer | Philosopher | My Life in San Andreas

Genkis

  • Guest
Re: Fuel
« Reply #11 on: 05 05, 2012, 12:36:17 pm »
If you say so I think you are right. you seem to have really thought out this
idea. how can I test it? but anyway I voted +1 the second after I read your
suggestion. ^^

Offline Chique

  • SAPD Leader
  • Honorable
  • *****
  • Posts: 1005
  • CHF-Chique[SAPD]
  • Registered: 15/08/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Fuel
« Reply #12 on: 05 05, 2012, 12:39:46 pm »
If you say so I think you are right. you seem to have really thought out this
idea. how can I test it? but anyway I voted +1 the second after I read your
suggestion. ^^

Join "www.Chique" server right now, to have a look at the CIT Fuel script and help in testing.
« Last Edit: 05 05, 2012, 01:19:42 pm by Chique »

CS Engineer | Web Developer | Philosopher | My Life in San Andreas

Genkis

  • Guest
Re: Fuel
« Reply #13 on: 05 05, 2012, 01:05:59 pm »
this will be great. I think it will really add to the gameplay.
And it works great too. With good instructions and everything.
I tested it and say: This must go on CIT!

FloTheBo

  • Guest
Re: Fuel
« Reply #14 on: 05 05, 2012, 01:12:41 pm »
A great script. Tested it now too. And if it is for me, this should go on the server. It is well thought over and works good. +1!