[Pomoc] Vozilo koje nije rent se moze upaliti

Započeo |TED| Boca SRB, April 02, 2013, 12:41:08 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:GTARP
Detaljan opis problema:E ovako imam jedan problem kad hocu da uzmem rent vozilo automobil izadje mi dijalog da rentam i ja pritisnem ne i mogu da upalim kola na shift i da vozim kako da napravim da ne mogu da se pale kola ako se ne uzme rent??
Dio skripte:Mislim da je ovo
Kod: [Izaberi]
if(!strcmp(cmd, "/engine", true) || strcmp(cmd, "/upali", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(IsPlayerInAnyVehicle(playerid))
{
    if(engineOn[GetPlayerVehicleID(playerid)] == 0)
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
return 1;
}
if(IsAnOwnableCar(idcar))
{
if(PlayerInfo[playerid][pPcarkey] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey2] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey3] == idcar) { }
else { return 1; }
}
if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509)
{
return 1;
}
if(gEngine[playerid] == 1) { return 1; }

new playerveh = GetPlayerVehicleID(playerid);
PutPlayerInVehicle(playerid, playerveh, 0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s okrece kljuc i pokusava da upali motor.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
SetTimerEx("StartingTheVehicle",1300,0,"i",playerid);
GameTextForPlayer(playerid, "~w~Motor se pokrece...",3500,3);
gEngine[playerid] = 1;
return 1;
}
if(engineOn[GetPlayerVehicleID(playerid)] == 1)
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
return 1;
}
if(IsAnOwnableCar(idcar))
{
    if(PlayerInfo[playerid][pPcarkey] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey2] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey3] == idcar) { }
else { return 1; }
}
if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509)
{
return 1;
}
engineOn[GetPlayerVehicleID(playerid)] = false;
//RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s okrece kljuc i gasi motor.", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
gEngine[playerid] = 0;
return 1;
}
}
    }
    return 1;
}

ili ovo
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 (GetPlayerMoney(playerid) <  500)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko novca !");
return 1;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
TogglePlayerControllable(playerid, 1)
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;
}*/
SafeGivePlayerMoney(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;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):


Daj public StartingTheVehicle


Village's Roleplay USKORO...

Village's Roleplay USKORO...