SA-MP Forums Archive
tuning cars... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: tuning cars... (/showthread.php?tid=186932)



tuning cars... - Rafa - 31.10.2010

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 !!!


Re: tuning cars... - introzen - 31.10.2010

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;
}



Re: tuning cars... - ColdXX - 31.10.2010

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);


Re: tuning cars... - Rafa - 31.10.2010

ohh thanks...


Re: tuning cars... - Rafa - 31.10.2010

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


Re: tuning cars... - Rafa - 31.10.2010

some one help


Re: tuning cars... - (SF)Noobanatior - 01.11.2010

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