03.08.2012, 13:37
(
Последний раз редактировалось RanSEE; 28.10.2012 в 07:37.
)
Fuel System
Here it goes-
Introduction
This is very simple, there is to the bottom right a textdraw with your fuel, vehicle health, and your speed in kilometers. Your fuel decreases by 1 every 3 seconds from 100. At 20, it will send a warning, "You are almost out of fuel, go to the nearest gas station!". To refuel, you simply go to a defined gas station and type /refuel, it will turn off your engine, take $20, and give you back to 100 gas. Then after done refueling, it will turn your car engine back on.
Functions
At the bottom right theres a textdraw with your fuel, vehicle health, and your speed in kilometers (This is the same). Your fuel decreased by 2 every second from 100 (Different). (It did not warn you at 20gas.). To refuel you just type /refuel anywhere (different) and it will take $80 and set your gas to 100 (different.). If you did not make it to a gas station on time, it would kick you out of your vehicle (different). (Added engine off/on)
Adding Gas Stations
Under
add the Co-ordinates
Gas Charges
Change -20 to desired prices in both the lines.
Gas Empty time
That is 1 gas every per second
Change /3 to desired number
Change Log:
At the Gas Station
You cannot move at the filling station, as engine turns off, well makes sense.
To change the time you must wait at the filling station
Under
Change 4500 to desired amount (4500 Denotes 4.5secs)
Download
http://www.mediafire.com/?lp8tjnj2tazr5f [amx+pwn] Version 1 - Old
http://rghost.net/41203563 [amx+pwn] Version 2 - New (Recommended)
Regards
Evil Junction
Here it goes-
Introduction
This is very simple, there is to the bottom right a textdraw with your fuel, vehicle health, and your speed in kilometers. Your fuel decreases by 1 every 3 seconds from 100. At 20, it will send a warning, "You are almost out of fuel, go to the nearest gas station!". To refuel, you simply go to a defined gas station and type /refuel, it will turn off your engine, take $20, and give you back to 100 gas. Then after done refueling, it will turn your car engine back on.
Functions
At the bottom right theres a textdraw with your fuel, vehicle health, and your speed in kilometers (This is the same). Your fuel decreased by 2 every second from 100 (Different). (It did not warn you at 20gas.). To refuel you just type /refuel anywhere (different) and it will take $80 and set your gas to 100 (different.). If you did not make it to a gas station on time, it would kick you out of your vehicle (different). (Added engine off/on)
Adding Gas Stations
Under
Код:
stock IsPlayerAtRefuelStation(playerid)
Код:
if (IsPlayerInRangeOfPoint(playerid,10,x,y,z)) return 1;
Код:
if (GetPlayerMoney(playerid) - 20 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!"); GivePlayerMoney(playerid, -20); //Sets the player's cash -$80
Gas Empty time
Код:
new string[128];format(string,sizeof string,"Fuel: %i",fuel[vid] /3);
Change /3 to desired number
Change Log:
At the Gas Station
You cannot move at the filling station, as engine turns off, well makes sense.
To change the time you must wait at the filling station
Under
Код:
SetTimerEx("timer_refuel",4500,false,"i",playerid);
Download
http://www.mediafire.com/?lp8tjnj2tazr5f [amx+pwn] Version 1 - Old
http://rghost.net/41203563 [amx+pwn] Version 2 - New (Recommended)
Regards
Evil Junction