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

Offline Chique

  • SAPD Leader
  • Honorable
  • *****
  • Posts: 1005
  • CHF-Chique[SAPD]
  • Registered: 15/08/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Fuel, Scripted
« Reply #75 on: 08 05, 2012, 09:59:59 pm »
150$ for 5% only this to much what we will pay like 2-3k to get 100% from it

What?

1% fuel costs $1, and thats not much! :o

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

Offline Will

  • Senior Community Member
  • ****
  • Posts: 42
  • Registered: 25/02/2012
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Group: The Soldiers
  • Ingame: ~|S|~Will
Re: Fuel, Scripted
« Reply #76 on: 08 05, 2012, 10:02:20 pm »
I say -1 unless your fuel lasts at least 1 hour of constant driving

Game

  • Guest
Re: Fuel, Scripted
« Reply #77 on: 08 05, 2012, 10:05:39 pm »
I say -1 unless your fuel lasts at least 1 hour of constant driving

Who will spend a whole hours driving non-stop, lol. And even if you do that there are still plenty of gas stations where you can buy more fuel.

I like this idea so +1 from me.

Offline FasT

  • **
  • Posts: 44
  • Registered: 31/10/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Group: HoBoS family
  • Ingame: FasT
Re: Fuel, Scripted
« Reply #78 on: 09 05, 2012, 09:40:09 am »
for all who said ''what I should do when my car run out of fuel in the middle of the road , well if you read the post well , you will find this ....
Quote
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.
and 1$ for 1% fuel isn't that much because 100% of fuel will cost you just 100$ ! is that a big deal ???
R.E.S.P.E.C.T


The one man army

kagali1991

  • Guest
Re: Fuel, Scripted
« Reply #79 on: 09 05, 2012, 01:25:34 pm »
I like this idea from chique

becuase its good and fun :) +1

BangOlufsen

  • Guest
Re: Fuel, Scripted
« Reply #80 on: 09 05, 2012, 03:33:03 pm »
I like this idea.
+1

Offline Chique

  • SAPD Leader
  • Honorable
  • *****
  • Posts: 1005
  • CHF-Chique[SAPD]
  • Registered: 15/08/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Fuel, Scripted
« Reply #81 on: 09 05, 2012, 03:39:44 pm »
Who will spend a whole hours driving non-stop, lol. And even if you do that there are still plenty of gas stations where you can buy more fuel.

I like this idea so +1 from me.

Exactly, while doing the script, I had to add 102 fuel markers... spread all accross SA, and nearly 30-40 fuel station locations... so is it too hard for those who did a -1 on this?

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

SpongeFin

  • Guest
Re: Fuel, Scripted
« Reply #82 on: 09 05, 2012, 03:54:40 pm »
I like this idea, not just because it adds new factor to car driving, but also makes players think more about their routines etc. Fuel price could be like dynamical if possible? So it would change every now and then.

Also, cheaper fuel for vips?

Offline Chique

  • SAPD Leader
  • Honorable
  • *****
  • Posts: 1005
  • CHF-Chique[SAPD]
  • Registered: 15/08/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Fuel, Scripted
« Reply #83 on: 09 05, 2012, 04:37:26 pm »
I like this idea, not just because it adds new factor to car driving, but also makes players think more about their routines etc. Fuel price could be like dynamical if possible? So it would change every now and then.

Also, cheaper fuel for vips?

yes already Arran, Dusty and I were discussing about dynamic fuel price, yeah would implement that too, soon. Lets just first test if it works fine. Updates can be made later on easily. Also cheaper fuels for VIP, yeah, could be done as an add-on later, thanks for feedback.


Edit, this is how it would look like, with a pre-release image.




Descriptions updated on First Topic.
« Last Edit: 09 05, 2012, 04:40:03 pm by Chique »

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

Perry

  • Guest
Re: Fuel, Scripted
« Reply #84 on: 09 05, 2012, 04:42:46 pm »
Honestly I don't really care as long as staff get infinite fuel, because I rarely play properly any more and get fucking bored after 10 minutes of anything but staff work. Also when I'm doing reports/mutes/support I like to drive around in my Bullet.

dunga007

  • Guest
Re: Fuel, Scripted
« Reply #85 on: 09 05, 2012, 04:58:14 pm »
veerY nice idea,agreed

Offline Arran

  • Administrator
  • ******
  • Posts: 5632
  • Registered: 20/11/2010
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Ingame: [CIT]Arran
Re: Fuel, Scripted
« Reply #86 on: 09 05, 2012, 04:58:36 pm »
Script lacks indentation consistency, many lines do not have correct indentation.

Some functions are inefficient, very strange thing to do:
Code: [Select]
function excludeTeam()
 --Exclude Teams (Those who won't deplete their fuel) | Default : Staff
local xcludeTeam={["Staff"]=true,}
return xcludeTeam
end

Why are you creating variables and tables every single time the functions are called? It's silly.

Code: [Select]
--Exclude Teams (Those who won't deplete their fuel) | Default : Staff
local xcludeTeam={["Staff"]=true}

function excludeTeam()
return xcludeTeam
end
Proof You Are so Much More Than What You Realise
Authority is not truth. Truth is authority.

Offline Astobix

  • **
  • Posts: 39
  • Registered: 03/08/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Group: Lanzetti Cartel
  • Ingame: Astobix
Re: Fuel, Scripted
« Reply #87 on: 09 05, 2012, 04:59:57 pm »
I agreed on this idea since I think it brings more RP.
Ex Police Chief
Ex AF MSGT
Ex Colonel of PAT             
Ex SWAT PFC
Ex FBI SA
Ex TF SSG

Offline Chique

  • SAPD Leader
  • Honorable
  • *****
  • Posts: 1005
  • CHF-Chique[SAPD]
  • Registered: 15/08/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Fuel, Scripted
« Reply #88 on: 09 05, 2012, 05:08:54 pm »
Quote
Why are you creating variables and tables every single time the functions are called? It's silly.

Code: [Select]
--Exclude Teams (Those who won't deplete their fuel) | Default : Staff
local xcludeTeam={["Staff"]=true}

function excludeTeam()
return xcludeTeam
end



Everytime? No!
The table variable is set and saved on first start or restart.
From the next time the excludeTeam function is just called once, when a new client starts, hence, only the variable excludeTeam would be passed into the Client only once a new client joins.


Its triggered via triggerServerEvent when a client joins -

Code: [Select]
function presetParameters()
if not(theEngineKey=="nil") then
bindKey (source, theEngineKey, "down", toggleEngine )
end
triggerClientEvent(source,"fuelOnJoin",getRootElement(),fuelCost(),ecoRate(),idleLoss(),speedLoss(),excludeTeam(),excludeVehicle(),whatKey(),initFuel())
end

and this function just passes the parameters once from server to client.

« Last Edit: 09 05, 2012, 05:12:25 pm by Chique »

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

kagali1991

  • Guest
Re: Fuel, Scripted
« Reply #89 on: 10 05, 2012, 09:19:14 am »


i like this