[Pomoc] "Nemamo vise zaliha"

Započeo Darko a.k.a OptX, Jun 17, 2011, 00:29:41 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: FactionGame
Detaljan opis problema: Kada sednem u auto da rentam ukucam /rentcar meni pise dole nemamo vise zaliha :/ Ukucam /veh 522 1 3 (NRG) sednem u njega pise da je na prodaju(ajde to mi i ne smeta) cena je 0$ ukucam /v buy pise nemamo vise zaliha :/ Sta da radim?
Dio skripte:


if(strcmp(cmd, "/rentcar", true) == 0)
{
        if(IsPlayerConnected(playerid))
{
if(GetPlayerVehicleID(playerid) >= 128 && GetPlayerVehicleID(playerid) <= 152)
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if(SBizzInfo[0][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
return 1;
}
if (JB_GetPlayerMoney(playerid) <  500)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko novca !");
return 1;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
SendClientMessage(playerid, COLOR_GREY, "Morate prvo da vratite iznajmljeni auto/motor/camac !");
return 1;
}
foreach (Player, i)
{
    if(HireCar[i] == GetPlayerVehicleID(playerid))
    {
        SendClientMessage(playerid, COLOR_GREY, "    Neko je vec iznajmio ovaj auto !");
        return 1;
    }
}
/*if(PlayerInfo[playerid][pPbiskey] == 1)
{
GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}*/
SafeJB_GivePlayerMoney(playerid,-500);
SBizzInfo[0][sbTill] += 500;
ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
SBizzInfo[0][sbProducts]--;
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Nemojte zaboraviti da ~r~/unrentcar~n~~g~/lock ~w~da zakljucate auto.",hirefee);
SendClientMessage(playerid, COLOR_YELLOW2, "Sada mozete upaliti motor !");
gEngine[playerid] = 0;
engineOn[GetPlayerVehicleID(playerid)] = false;
//TogglePlayerControllable(playerid, 1);
GameTextForPlayer(playerid, string, 5000, 3);
}
}
return 1;
}
if(strcmp(cmd, "/rentbike", true) == 0)
{
        if(IsPlayerConnected(playerid))
{
if(GetPlayerVehicleID(playerid) >= 153 && GetPlayerVehicleID(playerid) <= 177)
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if(SBizzInfo[0][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
return 1;
}
if (JB_GetPlayerMoney(playerid) <  150)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate dovoljno novca da iznajmite skuter !");
return 1;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
SendClientMessage(playerid, COLOR_GREY, "Morate prvo da vratite iznajmljeni auto/motor/camac !");
return 1;
}
foreach (Player, i)
{
    if(HireCar[i] == GetPlayerVehicleID(playerid))
    {
        SendClientMessage(playerid, COLOR_GREY, "    Neko je vec iznajmio ovaj skuter !");
        return 1;
    }
}
/*if(PlayerInfo[playerid][pPbiskey] == 0)
{
GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}*/
if (JB_GetPlayerMoney(playerid) <  SBizzInfo[0][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate dovoljno novca !");
return 1;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
SendClientMessage(playerid, COLOR_GREY, "Morate prvo da vratite iznajmljeni auto/motor/camac  !");
return 1;
}
foreach (Player, i)
{
    if(HireCar[i] == GetPlayerVehicleID(playerid))
    {
        SendClientMessage(playerid, COLOR_GREY, "    Neko je vec iznajmio ovaj skuter !");
        return 1;
    }
}
SafeJB_GivePlayerMoney(playerid,-SBizzInfo[0][sbEntranceCost]);
SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
SBizzInfo[0][sbProducts]--;
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Nemojte zaboraviti da ~b~/unrentbike~n~~g~/lock ~w~da zakljucate skuter",hirefee);
TogglePlayerControllable(playerid, 1);
gEngine[GetPlayerVehicleID(playerid)] = 1;
GameTextForPlayer(playerid, string, 5000, 3);
}
}
return 1;
}
Respect : [TG]$--L84S--$,System32,[BD]Gagi_Corleone

Stavis ovako
if(strcmp(cmd, "/rentcar", true) == 0)
{
        if(IsPlayerConnected(playerid))
{
if(GetPlayerVehicleID(playerid) >= 128 && GetPlayerVehicleID(playerid) <= 152)
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if (JB_GetPlayerMoney(playerid) <  500)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko novca !");
return 1;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
SendClientMessage(playerid, COLOR_GREY, "Morate prvo da vratite iznajmljeni auto/motor/camac !");
return 1;
}
foreach (Player, i)
{
    if(HireCar[i] == GetPlayerVehicleID(playerid))
    {
        SendClientMessage(playerid, COLOR_GREY, "    Neko je vec iznajmio ovaj auto !");
        return 1;
    }
}
/*if(PlayerInfo[playerid][pPbiskey] == 1)
{
GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}*/
SafeJB_GivePlayerMoney(playerid,-500);
SBizzInfo[0][sbTill] += 500;
ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
SBizzInfo[0][sbProducts]--;
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Nemojte zaboraviti da ~r~/unrentcar~n~~g~/lock ~w~da zakljucate auto.",hirefee);
SendClientMessage(playerid, COLOR_YELLOW2, "Sada mozete upaliti motor !");
gEngine[playerid] = 0;
engineOn[GetPlayerVehicleID(playerid)] = false;
//TogglePlayerControllable(playerid, 1);
GameTextForPlayer(playerid, string, 5000, 3);
}
}
return 1;
}
if(strcmp(cmd, "/rentbike", true) == 0)
{
        if(IsPlayerConnected(playerid))
{
if(GetPlayerVehicleID(playerid) >= 153 && GetPlayerVehicleID(playerid) <= 177)
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if (JB_GetPlayerMoney(playerid) <  150)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate dovoljno novca da iznajmite skuter !");
return 1;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
SendClientMessage(playerid, COLOR_GREY, "Morate prvo da vratite iznajmljeni auto/motor/camac !");
return 1;
}
foreach (Player, i)
{
    if(HireCar[i] == GetPlayerVehicleID(playerid))
    {
        SendClientMessage(playerid, COLOR_GREY, "    Neko je vec iznajmio ovaj skuter !");
        return 1;
    }
}
/*if(PlayerInfo[playerid][pPbiskey] == 0)
{
GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}*/
if (JB_GetPlayerMoney(playerid) <  SBizzInfo[0][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate dovoljno novca !");
return 1;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
SendClientMessage(playerid, COLOR_GREY, "Morate prvo da vratite iznajmljeni auto/motor/camac  !");
return 1;
}
foreach (Player, i)
{
    if(HireCar[i] == GetPlayerVehicleID(playerid))
    {
        SendClientMessage(playerid, COLOR_GREY, "    Neko je vec iznajmio ovaj skuter !");
        return 1;
    }
}
SafeJB_GivePlayerMoney(playerid,-SBizzInfo[0][sbEntranceCost]);
SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
SBizzInfo[0][sbProducts]--;
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Nemojte zaboraviti da ~b~/unrentbike~n~~g~/lock ~w~da zakljucate skuter",hirefee);
TogglePlayerControllable(playerid, 1);
gEngine[GetPlayerVehicleID(playerid)] = 1;
GameTextForPlayer(playerid, string, 5000, 3);
}
}
return 1;
}

ili namjestis u sbizz da bude 100 produkts svejedno ti je.