Can't see vehicles after changing virtualworld
#1

after changing virtual world and coming back to the previous one I can't see any vehicle for some reason although I'm changing back to virtualworld 0 which is the vehicle virtual world as well. I'm using 0.3.DL is that a known issue?
Reply
#2

PHP код:
 SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), virtualid); 
Reply
#3

make a debug for the car virtual world with GetVehicleVirtualWorld and see if it matches yours
Reply
#4

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
make a debug for the car virtual world with GetVehicleVirtualWorld and see if it matches yours
I did it, still nothing.
All I do is using /setvirtualworld [world] command and when I'm back the vehicles are gone but not the rest of the things such as pickups and 3dlabels.

PHP код:
CreateVehicle(4112600, -220014011, -1);
AddStaticVehicle(5202603, -219514001); // hydra 
nothing is wrong with my command though, when I use virtualworld change on playerspawn it won't show as well
PHP код:
CMD:setvirtualworld(playeridparams[])
{
    if(
sscanf(params"d"I[0])) return Message(playeridTYPE_USAGE"/virtualworld [virtualworld]");
    
SetPlayerVirtualWorld(playeridI[0]);
    return 
1;

before changing vw:


after changing vw:


after changing back to vw 0:


the screenshots are not edited, the hp loss is due to hunger and dehydration

Also it won't show vehicles that were created after changing the interior:
PHP код:
CMD:adminvehicle(playeridparams[])
{
    new 
string[64];
    if(
DB[playerid][Admin] < 3) return Message(playeridTYPE_ERROR"You're not allowed to use this command.");
    if(
sscanf(params"d"I[0])) return Message(playeridTYPE_USAGE"/adminvehicle [model id]");
    
DestroyVehicle(AVehicle[playerid]);
    
GetPlayerPos(playeridF[0], F[1], F[2]);
    
GetPlayerFacingAngle(playeridF[3]);
    
AVehicle[playerid] = CreateVehicle(I[0], F[0], F[1], F[2], F[3], 11, -1);
    
SetVehicleVirtualWorld(AVehicle[playerid], GetPlayerVirtualWorld(playerid));
    
LinkVehicleToInterior(AVehicle[playerid], GetPlayerInterior(playerid));
    
SetVehicleNumberPlate(AVehicle[playerid], "{FFFFFF}Admin");
    
//PutPlayerInVehicle(playerid, AVehicle[playerid], 0);
    
format(stringsizeof(string), "Spawned an OOC Admin vehicle (%d)."GetVehicleModel(AVehicle[playerid]));
    
Message(playeridTYPE_ADMINstring);
    return 
1;

Reply
#5

maybe you set another vw other than 0 when a player connects?
Reply
#6

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
maybe you set another vw other than 0 when a player connects?
It's not related, the player can see the vehicles when they spawn, however after changing interior they can't see it when they come back to the virtual work of the vehicle
Reply
#7

can you use this when you login,after you use cmd,and after you use cmd back again,and do the same thing for the car`s virtual world?

PHP код:
YCMD:vw(playeridparams[], help)
    {
        new 
string[32];
        
format(stringsizeof(string), "vw %d"GetPlayerVirtualWorld(playerid));
        
SendClientMessage(playerid0xFFFFFFFFstring);
        return 
1;
    } 
Reply
#8

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
can you use this when you login,after you use cmd,and after you use cmd back again,and do the same thing for the car`s virtual world?

PHP код:
YCMD:vw(playeridparams[], help)
    {
        new 
string[32];
        
format(stringsizeof(string), "vw %d"GetPlayerVirtualWorld(playerid));
        
SendClientMessage(playerid0xFFFFFFFFstring);
        return 
1;
    } 
https://imgur.com/a/Yfsi0
Reply
#9

try this

PHP код:
YCMD:setvw(playeridparams[], help)
{
    new 
id,intid;
    if(
sscanf(params"ui"idintid)) return SendUsage(playerid,"/setvw <Name/Playerid> <vw>");
    
SetPlayerVirtualWorld(idintid);

Reply
#10

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
try this

PHP код:
YCMD:setvw(playeridparams[], help)
{
    new 
id,intid;
    if(
sscanf(params"ui"idintid)) return SendUsage(playerid,"/setvw <Name/Playerid> <vw>");
    
SetPlayerVirtualWorld(idintid);

it's working the same as my command, dude it doesn't work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)