SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 12/03/2007, 03:17 AM   #1
Pixels^
Gangsta
 
Join Date: Dec 2006
Posts: 845
Reputation: 12
Default [FS]Basic Fuel Filterscript

[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
Pixels^ is offline   Reply With Quote
Old 12/03/2007, 03:33 AM   #2
yom
High-roller
 
Join Date: Jul 2006
Posts: 2,015
Reputation: 5
Default Re: [FS]Basic Fuel Filterscript

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

pawn Code:
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.
yom is offline   Reply With Quote
Old 12/03/2007, 03:36 AM   #3
Pixels^
Gangsta
 
Join Date: Dec 2006
Posts: 845
Reputation: 12
Default Re: [FS]Basic Fuel Filterscript

Its a basic script right now. Later on I will be updating it. Thanks for the opinions Yom.
Pixels^ is offline   Reply With Quote
Old 12/03/2007, 03:41 AM   #4
Revelator
Big Clucker
 
Join Date: Jul 2006
Posts: 97
Reputation: 2
Default Re: [FS]Basic Fuel Filterscript

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
Revelator is offline   Reply With Quote
Old 12/03/2007, 03:57 AM   #5
Pixels^
Gangsta
 
Join Date: Dec 2006
Posts: 845
Reputation: 12
Default Re: [FS]Basic Fuel Filterscript

I'll fix.
Pixels^ is offline   Reply With Quote
Old 12/03/2007, 11:29 AM   #6
Donny_k
High-roller
 
Donny_k's Avatar
 
Join Date: May 2006
Posts: 1,066
Reputation: 4
Default Re: [FS]Basic Fuel Filterscript

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).


__________________
We don't stop playing because we grow old, we grow old because we stop playing.
Donny_k is offline   Reply With Quote
Old 12/03/2007, 05:49 PM   #7
Riantoju
Little Clucker
 
Join Date: Mar 2007
Posts: 1
Reputation: 0
Default Re: [FS]Basic Fuel Filterscript

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
Riantoju is offline   Reply With Quote
Old 12/03/2007, 06:20 PM   #8
kspeed
Big Clucker
 
Join Date: Aug 2006
Posts: 69
Reputation: 0
Default Re: [FS]Basic Fuel Filterscript

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]
kspeed is offline   Reply With Quote
Old 15/03/2007, 10:55 AM   #9
cooldown
Little Clucker
 
Join Date: Jan 2007
Posts: 4
Reputation: 0
Default Re: [FS]Basic Fuel Filterscript

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^
cooldown is offline   Reply With Quote
Old 06/06/2007, 01:47 PM   #10
Ark
Little Clucker
 
Join Date: May 2007
Posts: 2
Reputation: 0
Default Re: [FS]Basic Fuel Filterscript

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.
Ark is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Help] Cant Find the Fuel Filterscript tony_fitto Scripting Help 2 19/10/2011 12:46 AM
[FilterScript] [FS]Basic Fuel System! -BETA- [NYRP]Mike. Filterscripts 23 20/04/2011 04:20 PM
[FilterScript] [FS]Basic Fuel & Engine System! Don_Corello Filterscripts 30 12/12/2010 08:03 PM
Fuel Asasi RomÔnă/Romanian 18 06/05/2010 05:20 PM
[FilterScript] [Filterscript] ┐Alguien sabe un Filterscript de la hora? CristianTdj Espa˝ol/Spanish 4 10/01/2010 10:11 AM


All times are GMT. The time now is 04:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.