[POMOC] Rentcar

Započeo David003, Avgust 06, 2012, 16:08:23 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Moja (U obliku GF-a)
Opis problema: Napravio sam rentcar al kad udem u auto za rentati i pisem /Rentcar nista se ne dogada
Dio skripte:

Evo cijeli rentcar sistem

new RentCar[7];

forward IsARentCar(carid);

public IsARentCar(carid)
{
for(new i = 0; i < sizeof(RentCar); i++)
{
if(carid == RentCar[i]) return 1;
}
return 0;
}


   if(IsARentCar(newcar))
{
if (HireCar[playerid] != newcar)
{
format(string,sizeof(string),"{48E31C}Ovo se vozilo iznajmljuje.\nDa iznajmis pisi: {FFFFFF}/rentcar.\n{48E31C}Da napustis vozilo {FFFFFF}/exit.\n{48E31C}Cijena: {FFFFFF}250$.");
ShowPlayerDialog(playerid, 44, DIALOG_STYLE_MSGBOX,"{F81414}Auto Rent",string,"U redu","");
TogglePlayerControllable(playerid, 0);

}
}


    RentCar[0] = AddStaticVehicleEx(401, 1834.6774,-1871.6604,13.1677, 0.000000, -1, -1,3600);
    RentCar[1] = AddStaticVehicleEx(405, 1837.9727,-1871.3445,13.2647, 0.000000, -1, -1,3600);
    RentCar[2] = AddStaticVehicleEx(410, 1841.3713,-1871.9327,13.0462, 0.000000, -1, -1,3600);
    RentCar[3] = AddStaticVehicleEx(436, 1844.5278,-1871.5554,13.1546,0.000000,-1,-1,3600);
    RentCar[4] = AddStaticVehicleEx(496, 1836.6978,-1853.3615,13.1062, 0.000000, -1, -1,3600);
    RentCar[5] = AddStaticVehicleEx(506, 1839.9052,-1853.6757,13.0902, 0.000000, -1, -1,3600);


   if(strcmp(cmd, "/rentcar", true) == 0)
{
        if(IsPlayerConnected(playerid))
{
if(GetPlayerVehicleID(playerid) >= RentCar[0] && GetPlayerVehicleID(playerid) <= RentCar[6])
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if (GetPlayerMoney(playerid) < 250)
{
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;
    }
}
GivePlayerCash(playerid,-250);
SBizzInfo[15][sbTill] += 250;
ExtortionSBiz(15, SBizzInfo[15][sbEntranceCost]);
SBizzInfo[15][sbProducts]--;
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Iznajmili ste vozilo sada samo vi mozete voziti ovo vozilo.",hirefee);
SendClientMessage(playerid, YELLOW, string);
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;
}
Poslednja Izmena: Avgust 06, 2012, 16:11:44 POSLE PODNE od Izvanzemaljac

Uskoro!
Usput trazim mapera,inbox zainteresirani!

Ovde gde ti je GetVehicleId , stavi id-eve , ne ovo rentcar.

Sve je bilo ok ali sam stavio krive ID-ove

LOCK!

Uskoro!
Usput trazim mapera,inbox zainteresirani!