Fuel , /veh - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Fuel , /veh (
/showthread.php?tid=560072)
Fuel , /veh -
Sime30 - 26.01.2015
Hi guys!
I made a fuel system , but it's not working for vehicles spawned with commands, only works for vehicles added on Init.
pawn Код:
forward FuelAndSync();
public FuelAndSync()
{
for(new i = 0; i < MAX_VEHICLES;i++) // I believe it's this thing here.
{
if(GetVehicleModel(i))
{
Regards!
Re: Fuel , /veh -
nezo2001 - 26.01.2015
I know why:
Becuase, you made a loop for all vehicles that you made but the vehicles thst made by commands is not in the MAX_VEHILCES.
But i don't know how

Hope you will understand
Re: Fuel , /veh -
Sime30 - 26.01.2015
Yep, I thought that too... Waitin' for some more answers...
Re: Fuel , /veh -
GreenSt4lker - 26.01.2015
Код:
forward FuelAndSync();
public FuelAndSync()
{
for(new i=0;i<MAX_VEHICLES;i++) {
fuel[i] = 100;
Evo nadam se da radi

I hope it works
Re: Fuel , /veh -
Sime30 - 26.01.2015
Quote:
Originally Posted by GreenSt4lker
Код:
forward FuelAndSync();
public FuelAndSync()
{
for(new i=0;i<MAX_VEHICLES;i++) {
fuel[i] = 100;
Evo nadam se da radi  I hope it works 
|
Koji k haha. Ma gorivo se dodjeljuje drukcije, nije u tome stvar. Stvar je sto ne trosi gorivo, gorivo se dobro dodaje. Sva naknadno dodana vozila ne trose jer ocito nisu pod MAX_VEHICLES. --- More answers, this isn't what I wanted?
Re: Fuel , /veh -
GreenSt4lker - 26.01.2015
Ahaaa ja mislio posto si napiso da neardi haha. Aj poslat cu ti u PM jedan fuel system pa uzmi sa njega.
Re: Fuel , /veh -
Sime30 - 26.01.2015
Still need help guys
Re: Fuel , /veh -
Sime30 - 27.01.2015
Bump