PDA

View Full Version : Help With Vehicles...


dorperez
19/11/2011, 04:44 PM
Hey guys,

I have interior for 5 trucks and i want to do that every truck has a diffrent virtual world.

For Increas:

I enter truck 1 interior and the virtual world is defined on 1.
And when I enter truck 2 interior and the virtual world is defined on 2.


Tnx!

FuTuяe
19/11/2011, 04:50 PM
Not sure if you mean this but I'll give it a go:


new truck[2]; //creating the truck variable to determine which virtual world we should get.

public OnGameModeInit()
{
truck[0] = AddStaticVehicle(................); // put your current script of creating the truck here.
truck[1] = AddStaticVehicle(................); // same here ;)
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == truck[0]) {
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid ), 1);
SetPlayerVirtualWorld(playerid, 1);
}
if(vehicleid == truck[1]) {
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid ), 2);
SetPlayerVirtualWorld(playerid, 2);
}
}

dorperez
20/11/2011, 05:49 AM
Didn't worked :(

FuTuяe
20/11/2011, 09:34 AM
You have to edit it to your own script.

dorperez
20/11/2011, 09:39 AM
I know man xD didn't worked...

dorperez
21/11/2011, 10:11 AM
Edit: Worked Tnx ! But if I want to put the interior in my vehicle system ...?