[HELP] Need help with Interior - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Need help with Interior (
/showthread.php?tid=266943)
[HELP] Need help with Interior -
MadalinX5 - 06.07.2011
Hello
I saw on a server one day a command "/world 1/2/3..." where you can switch between worlds.
In scripting I do believe that means switching interiors but:
-How can I switch the interior but still remain in San Andreas Outworld?
Re: [HELP] Need help with Interior -
Wesley221 - 06.07.2011
With
pawn Код:
SetPlayerVirtualWorld(playerid, virtualworld)
Change the "virtualworld" to any id you like
https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld
Re: [HELP] Need help with Interior -
MadalinX5 - 06.07.2011
Thank you

This is good!
But is there any way to make it generate a random virtualworld between 1 - 10?
Re: [HELP] Need help with Interior -
Shadoww5 - 06.07.2011
PHP код:
SetPlayerVirtualWorld(playerid, random(11));
This way the virtual world can be between 0 and 10. If you want a number between 1 and 10:
PHP код:
Start:
new rand = random(11);
if(rand == 0) { goto Start; }
SetPlayerVirtualWorld(playerid, rand);
Re: [HELP] Need help with Interior -
MadalinX5 - 06.07.2011
Thanks

You 2 are great! Thanks for all the help