tuning cars...
#1

guys i want on player enter vehicle automaticlu the car get tuned and i have something like this:

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
    if(vehicleid == vehicle)
    {
        AddVehicleComponent(vehicle, 1010);
        AddVehicleComponent(vehicle, 1079);
    }
    else if(vehicleid == vehicle1)
    {
        AddVehicleComponent(vehicle, 1010);
        AddVehicleComponent(vehicle, 1079);
    }
    return 1;
}
the vehicle1 dont work when ill get in car what is the problem ?

and please someone tell me the code to make all yellow arrows to desapear cause i forget it

Thanks !!!
Reply
#2

You've made it so that when you enter vehicle1 it puts mods on vehicle(0).

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
    if(vehicleid == vehicle)
    {
        AddVehicleComponent(vehicle, 1010);
        AddVehicleComponent(vehicle, 1079);
    }
    else if(vehicleid == vehicle1)
    {
        AddVehicleComponent(vehicle1, 1010);
        AddVehicleComponent(vehicle1, 1079);
    }
    return 1;
}
Reply
#3

If by yellow arrows u mean enterrable places ,use
pawn Код:
DisableInteriorEnterExits();
Try to remove the "else" from your code.
Oh and u made a mistake at OnPlayerEnterVehicle

pawn Код:
else if(vehicleid == vehicle1)
    {
        AddVehicleComponent(vehicle1, 1010);
        AddVehicleComponent(vehicle1, 1079);
    }
U added AddVehicleComponent(vehicle,1010) istead of AddVehicleCOmponent(vehicle1,1010);
Reply
#4

ohh thanks...
Reply
#5

lol guys again problem with this sh*t i maked this all but now on vehicle1 can tune on the other one cant :S
Reply
#6

some one help
Reply
#7

how do you define vehicle and vehicle1?
coz i think there will only be 1 car on the server this would work for
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)