[FilterScript] [FS]Basic Fuel Filterscript
#1

[FS]Basic Fuel Filterscript

Credits to:
1.) Whoever made GetDistanceBetweenPlayers.
2.) Sacky's GetClosestPlayer

Features:
/fuel
fuel deplete
gametext fuel display

Fixed "100" display

Download Link:
http://www.megaupload.com/?d=WEGF7GKC
Reply
#2

I haven't tested it yet, but i've looked at the code:

pawn Код:
for(new c=0; c<255; c++) { // loop through 255 vehicles
Gas[c] = MAX_GAS; // Gas of 255 vehicles is 100
}
^ I think you can just do ' new Gas[MAX_CARS] = MAX_GAS; '

And why 2 timers? They do almost the same checks, you can easily combine them and run only one timer.

And if i can suggest one thing, it will be easy enough, adding fuel stations where we can refill (maybe ask Donny_K if you can copy the coords of stations from his fuel script). Else i will make it and let you know when its done.
Reply
#3

Its a basic script right now. Later on I will be updating it. Thanks for the opinions Yom.
Reply
#4

the fuel shows 100 constant, and /exit defuse to work

the car stopped when it was empty yes, but the rest is kinda bugged



(answer for the answer down):

ok, sure thing
Reply
#5

I'll fix.
Reply
#6

You know what is funny, I've allready made this !

I lost it along with my other scripts when my HDD failed but it was near enough an exact copy of my original (the original ) system but with a change to how it stoped the car (get/set same pos not toggle) and how it displayed CP's and handled them in regards to actuall scripts having them in also. I also added a few admin commands for re~filling vehicles, setting the max amount, setting the depleation time and I also put in an array of vehicle types with a few functions for getting the vehicle type and setting the max amount of fuel off that type etc.

I may remake it, depends if Pixels makes this into something with substance. No point re~inventing the wheel now is there......

Oh and Pixels a quick tip, think about the loop again. How am I going to stop it effecting my BMX with the loop maxing out all my available vehicles (Rhetorical, but somethig to think about).


Reply
#7

Friends,
A command would like to insert in mine gamemode to supply propagates it, of form that player goes ties gas stations and supplies. how I can make this?

Tank's

R7C4RD0
Reply
#8

its bugged..

its show me CAR FUEL 100 everytime.. and sometimes there no fuel and need get out from the car ,but its already show 100% fuel :X

[sorry for my bad english]
Reply
#9

Quote:
Originally Posted by kspeed
its bugged..

its show me CAR FUEL 100 everytime.. and sometimes there no fuel and need get out from the car ,but its already show 100% fuel :X

[sorry for my bad english]
thats right!
when pixels dont want to update i will try to fix and then i upload it again...when i may i wait of an answer from pixels^
Reply
#10

yes it shows car fuel 100 everytime

if(GetPlayerState(i) == PLAYER_STATE_DRIVER) {
new p = GetClosestPlayer(i);
new string[255];
new veh = GetPlayerVehicleID(p);
format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~g~Fuel:%d",Gas[veh]);
GameTextForPlayer(i,string,1000,5);

if(GetPlayerState(i) == PLAYER_STATE_DRIVER) {
new p = GetClosestPlayer(i);
new string[255];
new veh = GetPlayerVehicleID(p);
format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~g~Fuel:%d",Gas[vehicle]);
GameTextForPlayer(i,string,1000,5);

just change "veh" to vehicle.
and it will change all the way down.

also i changed my #define MAX_GAS 100
to
#define MAX_GAS 600
since 100 seconds isnt nearly much time.. 1minute and 40 seconds.. I don't think that will be working with me.

Also, that bug when you are out of fuel, and you can't move?
If there is an admin, stay in your car when you are out of fuel. Tell him to 'thaw' you. After you 'refuel' though.

Then you are able to move.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)