Jump to content
  • 0

[Problema] /rentbike


Sn4Ke

Question

Problema intalnita (descriere):Deci am gamemodul Toxic-Game, si la spawn sunt vreo 8 Bike-uri, trebe sa iei rent cu comanda /rentbike, daca dai /rentbike si te dai jos de pe motor si te urci iara, iara trebe sa dai /rentbike, stit vreo solutie? trebe sa fac un stock ?
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul:

if(strcmp(cmd, "/rentbike", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(GetPlayerVehicleID(playerid) >= 112 && GetPlayerVehicleID(playerid) <= 130)
            {
                if(SBizzInfo[0][sbProducts] == 0)
                {
                    GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
                    return 1;
                }
                /*if(PlayerInfo[playerid][pPbiskey] == 0)
                {
                    GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
                    TogglePlayerControllable(playerid, 1);
                    return 1;
                }*/
                if (GetPlayerCash(playerid) <  SBizzInfo[0][sbEntranceCost])
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "   Nu ai atat de mult cash !");
                    return 1;
                }
                GivePlayerCash(playerid,-SBizzInfo[0][sbEntranceCost]);
                SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
                ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
                SBizzInfo[0][sbProducts]--;
                OnPropUpdate();
                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                TogglePlayerControllable(playerid, 1);
                GameTextForPlayer(playerid, string, 5000, 3);
            }
        }
        return 1;
    }
Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da, am incercat sa scot comanda, dar imi da bug la Clanu saran, cand ma irc in sultan imi zice Infernus de vanzare, tasteaza /buycar s.a.m.d .
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
  if(strcmp(cmd, "/rentbike", true) == 0)
  {
      if(IsPlayerConnected(playerid))
    {
      if(GetPlayerVehicleID(playerid) >= 112 && GetPlayerVehicleID(playerid) <= 130)
      {
        if (GetPlayerCash(playerid) <SBizzInfo[0][sbEntranceCost])
        {
          SendClientMessage(playerid, COLOR_GRAD2, " Nu ai atat de mult cash !");
          return 1;
        }
        GivePlayerCash(playerid,-SBizzInfo[0][sbEntranceCost]);
        SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
        ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
        SBizzInfo[0][sbProducts]--;
        OnPropUpdate();
        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
        TogglePlayerControllable(playerid, 1);
        GameTextForPlayer(playerid, string, 5000, 3);
      }
    }
    return 1;
  }

Incearca asa ...

242086.png

Link to comment
Share on other sites

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.