Help With Vehicles... - 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)
+--- Thread: Help With Vehicles... (
/showthread.php?tid=298174)
Help With Vehicles... -
dorperez - 19.11.2011
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!
Re: Help With Vehicles... -
FuTuяe - 19.11.2011
Not sure if you mean this but I'll give it a go:
pawn Код:
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);
}
}
Re: Help With Vehicles... -
dorperez - 20.11.2011
Didn't worked
Re: Help With Vehicles... -
FuTuяe - 20.11.2011
You have to edit it to your own script.
Re: Help With Vehicles... -
dorperez - 20.11.2011
I know man xD didn't worked...
Re: Help With Vehicles... -
dorperez - 21.11.2011
Edit: Worked Tnx ! But if I want to put the interior in my vehicle system ...?