Problem with vehicles
#1

Hey dudes, i've a little problem with vehicles.

In fact, when i enter in any vehicle, owned or not, i can control and drive with it.

So i wanna make that :
-If it's my vehicle nobody else than me can start the vehicle up
- If it isn't my vehicle, i can enter in the vehicle but not start it up.

Can someone help ? Here is the startup code.

Or pastebin: http://pastebin.com/jUK9e2zi

Quote:

public Startup(playerid, vehicleid)
{
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
new newcar = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER || engineOn[vehicleid])
{
TogglePlayerControllable(playerid, false);
engineOn[GetPlayerVehicleID(playerid)] = false;
//I do nothing!
}
else if(IsPlayerInAnyVehicle(playerid) && !engineOn[vehicleid] && !vehicleEntered[playerid][vehicleid] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && pveh != 510 && pveh != 462 && newcar != 107 && newcar != 108 && newcar != 109 && newcar != 110 && !IsAHarvest(newcar) && !IsADrugHarvest(newcar) && !IsASweeper(newcar))
{
engineOn[GetPlayerVehicleID(playerid)] = false;
if(voiturepaslui[playerid] == 1)
{
TogglePlayerControllable(playerid, false);
vehicleEntered[playerid][vehicleid] = false;
engineOn[GetPlayerVehicleID(playerid)] = false;
}
if(CarInfo[vehicleid][cOwned]==0 && IsAnOwnableCar(vehicleid))
{
TogglePlayerControllable(playerid, false);
engineOn[GetPlayerVehicleID(playerid)] = false;
}
else
{
SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Faites /contact pour dйmarrer le vйhicule, /sortir ou F pour sortir, /fermer pour fermer ton vйhicule.");
TogglePlayerControllable(playerid, 0);
vehicleEntered[playerid][vehicleid] = false;
}
}
else if(IsPlayerInAnyVehicle(playerid) && !engineOn[vehicleid] && vehicleEntered[playerid][vehicleid] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && pveh != 510 && pveh != 462 && newcar != 107 && newcar != 108 && newcar != 109 && newcar != 110 && !IsAHarvest(newcar) && !IsADrugHarvest(newcar) && !IsASweeper(newcar))
{
if(voiturepaslui[playerid] == 0)
{
TogglePlayerControllable(playerid, true);
}
if(CarInfo[vehicleid][cOwned]==1 && IsAnOwnableCar(vehicleid))
{
}
else
{
SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Faites /contact pour dйmarrer le vйhicule, /sortir ou F pour sortir, /fermer pour fermer ton vйhicule.");
TogglePlayerControllable(playerid, 0);

}
}
}

Reply
#2

up help please
Reply
#3

nobody can ..?
Reply
#4

Wait 24 fucking hours before Triple Bumping..
Reply
#5

up please
Reply
#6

Eyo'
Dont think we will help you with that Spam shit'
Reply
#7

Lol, i just upped the toppic twice, it was at page 3 each time
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)