Jump to content
  • 0

Question

Posted

Am si eu o problema cu Fill-ul la masini , in loc sa scada el creste :-"...... habar nu am de ce ca mergea ok ...

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

8 answers to this question

Recommended Posts

Posted

dane comanda de fill

[pawn]if(strcmp(cmd, "/fill", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

if(IsAtGasStation(playerid))

{

                if(Gas[gLastCar[playerid]] > 100)

{

SendClientMessage(playerid,COLOR_GREY,"  You have more than 100 fuel.");

return 1;

}

    GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Re-Fueling Vehicle, please wait",2000,3);

SetTimer("Fillup",RefuelWait,0);

Refueling[playerid] = 1;

}

else

{

SendClientMessage(playerid,COLOR_GREY,"  You're not at a Gas Station!");

}

}

    return 1;

}[/pawn]

stie careva ?

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Posted

da si publicul Fillup

asta cred ca e ... [pawn]public Fillup()

{

for(new i=0; i<MAX_PLAYERS; i++)

  {

  if(IsPlayerConnected(i))

  {

    new VID;

    new FillUp;

    new string[128];//era 256

    VID = GetPlayerVehicleID(i);

    FillUp = GasMax - Gas[VID];

if(Refueling == 1)

    {

if(GetPlayerMoney(i) >= FillUp+4)

{

Gas[VID] += FillUp;

FillUp = FillUp * SBizzInfo[3][sbEntranceCost];

    format(string,sizeof(string),"* Vehicle filled up, for: $%d.",FillUp);

    SendClientMessage(i,COLOR_LIGHTBLUE,string);

GivePlayerMoney(i, - FillUp);

SBizzInfo[3][sbTill] += FillUp;

ExtortionSBiz(3, FillUp);

Refueling = 0;

}

  else

  {

      format(string,sizeof(string),"* Not enough Money to refill, it costs $%d to fill your Vehicle.",FillUp);

    SendClientMessage(i,COLOR_LIGHTBLUE,string);

  }

}

}

}[/pawn]

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Posted

scriptul este bun, dar acuma vine intrebarea daca sbEntranceCost este valoare negativa

daca "intrarea in bizz" este setata cu minus.... daca da atunci minus cu minu = plus si in loc sa iti scada banii iti scresc

Posted

scriptul este bun, dar acuma vine intrebarea daca sbEntranceCost este valoare negativa

daca "intrarea in bizz" este setata cu minus.... daca da atunci minus cu minu = plus si in loc sa iti scada banii iti scresc

Problema este cand merg cu masina , si daca e asa cum spui tu cum as putea sa rezolv... :-"

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Posted

Vezi la functia asta [pawn]public CheckGas()

{

new string[256];

for(new i=0;i<MAX_PLAYERS;i++ && !IsPlayerNPC(i))

{

    if(IsPlayerConnected(i))

      {

          if(GetPlayerState(i) == PLAYER_STATE_DRIVER)

          {

      new vehicle = GetPlayerVehicleID(i);

        if(Gas[vehicle] >= 1)

  {

      if(Gas[vehicle] <= 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~Combustivil putin",5000,3);

}

    }

      if(gGas == 1) {

      if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle))

      {

      format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Combustibil:~w~ N/A");

}

else

{

                        format(string, sizeof(string), "~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Combustivil:~w~ %d%",Gas[vehicle]);

}

      GameTextForPlayer(i,string,20500,3); }

if(IsAPlane(vehicle) || IsABoat(vehicle) || IsABike(vehicle) || IsAHarvest(vehicle) || IsADrugHarvest(vehicle) || IsASweeper(vehicle) || engineOn[vehicle] == 0) { Gas[vehicle]++; }

              Gas[vehicle]--;

  }

  else

          {

              NoFuel = 1;

              TogglePlayerControllable(i, 0);

        GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Vehicul fara combustibil",1500,3);

}

}

    }

}

return 1;

}[/pawn]

Vezi sa ai [pawn]Gas[vehicle]--[/pawn] pe --

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted

Gata , am rezolvat , am sters // din fata [pawn]Gas[vehicle]--[/pawn]

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.