pomoc = postojeca komanda

Započeo Ante_Dracar aka Lopa, Jul 11, 2010, 21:52:09 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

ovaka,imam napravljenu komandu /RENTCAR ali nezz sta moram vamo prominit da kada igrac renta vozilo  da mu se npr oduzme -700$$ dolara i tih 700$$ dolara doda vlasniku bizza,evo pogledajte komandu...


//---------------------------------------rentcar---------------------------------------
if(strcmp(cmd, "/rentcar", true) == 0)
{
        if(IsPlayerConnected(playerid))
{
if(GetPlayerVehicleID(playerid) >= 72 && GetPlayerVehicleID(playerid) <= 77)
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if(GetPlayerVehicleID(playerid) >= 72 && GetPlayerVehicleID(playerid) <= 74)
{
if(SBizzInfo[0][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Prodano", 5000, 1);
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == 0)
{
GameTextForPlayer(playerid, "~w~Nema zaduzenih sefova", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}
if (GetPlayerMoney(playerid) <  SBizzInfo[0][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko novaca!");
return 1;
}
GivePlayerMoney(playerid,-SBizzInfo[0][sbEntranceCost]);
SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
SBizzInfo[0][sbProducts]--;
}
if(GetPlayerVehicleID(playerid) >= 75 && GetPlayerVehicleID(playerid) <= 77)
{
if(SBizzInfo[1][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Prodano", 5000, 1);
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == 1)
{
GameTextForPlayer(playerid, "~w~Nema zaduzenih sefova", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}
if (GetPlayerMoney(playerid) <  SBizzInfo[1][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko novaca !");
return 1;
}
GivePlayerMoney(playerid,-SBizzInfo[1][sbEntranceCost]);
SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost];
ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]);
SBizzInfo[1][sbProducts]--;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
}
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Nadamo se da cete uzivati ~n~koristite ove aute~n~Za zakljucavanje i otkljucavanje auta koristite~n~type ~g~/lock~n~~w~molimo vozite sigurno",hirefee);
TogglePlayerControllable(playerid, 1);
GameTextForPlayer(playerid, string, 5000, 3);
}
}
return 1;
}


hvala unaprjed...