Vehicle virtual world and interior
#1

Hello ... again.

I've got another problem which I don't see solution for it.
I made that vehicles save their virtual world and interior in the file. On server restart 'LoadDynamicCars()' is called which spawns all the cars from the file. I also added SetVehicleVirtualWorld & LinkVehicleToInterior, so vehicles would be set in the right vw and interior.

When I teleport to interior and vw where vehicle should spawn there is nothing. I put myself in that vehicle ID and I become invisable (I am still in the right interior and virtual world). I use command which just does
Код:
					new inter = GetPlayerInterior(playerid);
					new world = GetPlayerVirtualWorld(playerid);
					LinkVehicleToInterior(vehicleid, DynamicCars[car][Interior]);
					SetVehicleVirtualWorld(vehicleid, DynamicCars[car][World]);
and I and vehicle become visable.

So basically vehicle is in the right virtual world and interior just stuck a little bit off ground and invisable. When I put myself in that vehicle vehicle blink a bit, so I can see it for a second before it disappears.
Oh and vehicles in vw and interior 0 spawn normally, just vehicles in any other interiors and virtual worlds cause problems. I have also tried to call SetVehicleVirtualWorld & LinkVehicleToInterior two times on 'LoadDynamicCars()', but nothing has changed.

I was thinking quite a bit, but I haven't found any solution to this yet.

Thanks for help
Reply
#2

I have tried adding static vehicle now and it happens the same.
pawn Код:
new vehicle1 = AddStaticVehicle(468,-1430.6820,-630.2808,1049.8923,279.2261,5,5); //Sanchez
    LinkVehicleToInterior(vehicle1, 4);
    SetVehicleVirtualWorld(vehicle1, 7);
I guess it's SA:MP bug? And if it is, any way to avoid it?
Reply
#3

I've never had any problems linking a vehicle to an interior and changing it's virtual world, not sure...
Reply
#4

It seems today is nto my scripting day Nothing works

It's weird that even static vehicle doesn't appear in right interior and vw :/

I also added myself some debug messages and everything seemed to be okay and IG it's not
Reply
#5

It works now. I made a timer on GameModeInit which calls a function which sets vehicle virtual worlds.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)