Quick question about vehicles and VirtualWorlds
#1

Heres the code i've done...

pawn Код:
public OnVehicleSpawn(vehicleid)
{
  for(new i=0;i<8;i++)
    {
      if(vehicleid == BJveh[i])
      {
        SetVehicleVirtualWorld(BJveh[i], 121);
        }
    }
   
    for(new j=0;j<11;j++)
    {
      if(vehicleid == BJveh2[j])
      {
        SetVehicleVirtualWorld(BJveh2[j], 121);
      }
    }
   
return 1;
}

They dont spawn straight away, like if i goto the location and world 121, they're not there. only apear when i do a respawning vehicles command..

Then i tried doing this.. Aswell as the above


pawn Код:
stock SpawnStuntVehicles()
{
    for(new vehicleid=0;vehicleid<19;vehicleid++)
    {
  for(new i=0;i<8;i++)
    {
      if(vehicleid == BJveh[i])
      {
        SetVehicleVirtualWorld(BJveh[i], 121);
      }
    }

    for(new j=0;j<11;j++)
    {
      if(vehicleid == BJveh2[j])
      {
        SetVehicleVirtualWorld(BJveh2[j], 121);
        }
    }
    }
return 1;
}
And added it below the vehicles, under OnGameModeInit, still it didnt work.
Reply
#2

Use
pawn Код:
SetVehicleVirtualWorld(...,...);
SetVehicleToRespawn(...);
Reply
#3

Tried that, still didn't work...

I still have to go ingame and do a vehicle respawn command..


Anyone able to tell me how to spawn vehicles in a VW.

So i could start up the server. and some vehicles i choose would span in another VW, witohut me even needing to go in game and do anything.
Reply
#4

I believe vehicles with virtual worlds are bugged atm.
Reply
#5

Nvm I have an idea that will probably get this working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)