10.02.2013, 15:50
(
Последний раз редактировалось roym899; 10.02.2013 в 16:28.
)
Hey,
I have a problem with SetVehiclePos and SetVehicleVirtualWorld.
I want to move a vehicle, change its VirtualWorld for 10 seconds to something else and the let it reappear in the standardworld (id=0)
I've tried both Linking to another interior and setting another virtual world. Both doesn't work. I could fix the problem by moving the car to an invisible place without any problem but I'm kinda curious why it doesn't work.
The car which shall be moved is attached as a trailer beforehand and it gets detached before moving/changing the virtual world.
So here is the code (the public funciton is forwarded):
coordx,y,z are any coordinates. it doesn't matter which I use.
I have a problem with SetVehiclePos and SetVehicleVirtualWorld.
I want to move a vehicle, change its VirtualWorld for 10 seconds to something else and the let it reappear in the standardworld (id=0)
I've tried both Linking to another interior and setting another virtual world. Both doesn't work. I could fix the problem by moving the car to an invisible place without any problem but I'm kinda curious why it doesn't work.
The car which shall be moved is attached as a trailer beforehand and it gets detached before moving/changing the virtual world.
So here is the code (the public funciton is forwarded):
Код:
public BringBackRepairedCar(vehicleid) { SetVehicleVirtualWorld(vehicleid, 0); } RepairAndDisappearTrailer(vehicleid) { new towedcar = GetVehicleTrailer(GetPlayerVehicleID(playerid)); towedcarplace[i][VEHICLEID] = towedcar; DetachTrailerFromVehicle(GetPlayerVehicleID(playerid)); SetVehicleVirtualWorld(towedcar, 10); RepairVehicle(towedcar); SetVehiclePos(towedcar, coordx, coordy, coordz); SetTimerEx("BringBackRepairedCar", 10000, false , "i", towedcar); }