[pomoc] gorivo

Započeo warning
21. Jan. 2012. Zaključano
500
pregleda
6
postova
warning
3
Hustler
21. Jan. 2012.
Skripta koju koristim: BU
Detaljan opis problema: jednostavno u vozilu gorivo se ne trosi....uvijek na istom borju stoju kao kad sam usao u njega a vozikam se sa njim po 30 min i uopste se ne trisi  😢
Dio skripte: ako treba nesto odma javite i postam
Neke slike/video za lakse dobivanje pomoci(neobavezno):/
Fico62
4
Enforcer
21. Jan. 2012.
Postaj cod gdje ti je to vjerovatno je do timera...
Luis
5
Godfather
21. Jan. 2012.
mora staviti onda da ti oduzima nesto ovako posto nisi nista postao od svoga :
Naprimjer :
new Gorivo;
Gorivo--;


Edit: Dio skripte : ?
warning
3
Hustler
21. Jan. 2012.
evo varijabla gdje provjerava gorivo:
forward CheckGas();

public CheckGas()
{
new string;
foreach (Player, i)
{
      if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
      {
      new vehicle = GetPlayerVehicleID(i);
        if(Gas >= 1)
  {
      if(Gas <= 10)
    {
  PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0);
  if(gGas == 0) {
  GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Rezervoar je skoro prazan",5000,3);
}
    }
      if(gGas == 1) {
      if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle) || IsADjubretar(vehicle) || IsNpcVehicle(vehicle))
      {
      format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Gorivo:~w~ N/A");
}
else
{
                format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Gorivo:~w~ %d%",Gas);
}
      GameTextForPlayer(i,string,20500,3); }
if(IsAPlane(vehicle) || IsNpcVehicle(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle) || IsADjubretar(vehicle) || engineOn == 0) { Gas++; }
              Gas--;
  }
  else
          {
              NoFuel = 1;
              TogglePlayerControllable(i, 0);
        GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Nema goriva u vozilu",1500,3);
}
    }
}
return 1;
}

checkgastimer = SetTimer("CheckGas", 50000, 1);
Luis
5
Godfather
21. Jan. 2012.
cemo ovo : 
Gas++; }
              Gas--;

probaj ovako :
forward CheckGas();

public CheckGas()
{
new string;
foreach (Player, i)
{
      if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
      {
      new vehicle = GetPlayerVehicleID(i);
        if(Gas >= 1)
  {
      if(Gas <= 10)
    {
  PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0);
  if(gGas == 0) {
  GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Rezervoar je skoro prazan",5000,3);
}
    }
      if(gGas == 1) {
      if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle) || IsADjubretar(vehicle) || IsNpcVehicle(vehicle))
      {
      format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Gorivo:~w~ N/A");
}
else
{
                format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Gorivo:~w~ %d%",Gas);
}
      GameTextForPlayer(i,string,20500,3); }
if(IsAPlane(vehicle) || IsNpcVehicle(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle) || IsADjubretar(vehicle) || engineOn == 0)
              Gas--;
  }
  else
          {
              NoFuel = 1;
              TogglePlayerControllable(i, 0);
        GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Vozilo nema goriva",1500,3);
}
}
    }
}
return 1;
}
warning
3
Hustler
22. Jan. 2012.
(10960) : error 010: invalid function or declaration

10960:
return 1;

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha