SA-MP Forums Archive
entering a interior makes the world disappear - 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: entering a interior makes the world disappear (/showthread.php?tid=499998)



entering a interior makes the world disappear - Jhony_Blaze - 10.03.2014

Hello guys, I occurred a problem that when I /enter an interior and than exiting it makes the world disappear and few objects are there only, and those are only the objects I edited.

What could be the problem? Here is the /enter /exit command for the building that makes this happen.

Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,3.0,-207.2261,1077.2693,20.5992)) //City Hall
    {
       SetPlayerInterior(playerid,10);
       SetPlayerPos(playerid,246.3760,109.2460,1003.2188);
       }
    return 1;
}
Here is the /exit command:

Код:
CMD:exit(playerid, params[])
{
       if(IsPlayerInRangeOfPoint(playerid,3.0,246.3760,109.2460,1003.2188)) //City Hall
       {
         SetPlayerPos(playerid,-207.2261,1077.2693,20.5992);
         }
     return 1;
}
Here is a picture:


Re: entering a interior makes the world disappear - Smikkeltoetje - 10.03.2014

pawn Код:
CMD:exit(playerid, params[])
{
       if(IsPlayerInRangeOfPoint(playerid,3.0,246.3760,109.2460,1003.2188)) //City Hall
       {
         SetPlayerInterior(playerid,0);
         SetPlayerVirtualWorld(playerid,0);
         SetPlayerPos(playerid,-207.2261,1077.2693,20.5992);
         }
     return 1;
}
Try resetting it back to vw 0 with this ,

Good luck and let me know if it worked out well!


Re: entering a interior makes the world disappear - Bingo - 10.03.2014

Код:
CMD:exit(playerid, params[])
{
       if(IsPlayerInRangeOfPoint(playerid,3.0,246.3760,109.2460,1003.2188)) //City Hall
       {
         SetPlayerVirtualWorld(playerid, 0);
         SetPlayerPos(playerid,-207.2261,1077.2693,20.5992);
         }
     return 1;
}
+rep
If worked.



AW: entering a interior makes the world disappear - Macronix - 10.03.2014

It's only a problem of the interior-id, not virtual world!


Re: entering a interior makes the world disappear - Bingo - 10.03.2014

Then use :-

Код:
SetPlayerInterior(playerid, 0);



Re: entering a interior makes the world disappear - Smikkeltoetje - 10.03.2014

SetPlayerInterior should do the trick as you used the code before to go to that interior id


Re: entering a interior makes the world disappear - Jhony_Blaze - 10.03.2014

Quote:
Originally Posted by Smikkeltoetje
Посмотреть сообщение
pawn Код:
CMD:exit(playerid, params[])
{
       if(IsPlayerInRangeOfPoint(playerid,3.0,246.3760,109.2460,1003.2188)) //City Hall
       {
         SetPlayerInterior(playerid,0);
         SetPlayerVirtualWorld(playerid,0);
         SetPlayerPos(playerid,-207.2261,1077.2693,20.5992);
         }
     return 1;
}
Try resetting it back to vw 0 with this ,

Good luck and let me know if it worked out well!
Works like butter lol Thanks !


Re: entering a interior makes the world disappear - Jhony_Blaze - 10.03.2014

+rep for everyone then


Re: entering a interior makes the world disappear - Smikkeltoetje - 10.03.2014

Quote:
Originally Posted by Jhony_Blaze
Посмотреть сообщение
+rep for everyone then
Thanks! I'm glad we were able to help you with your problem.