/exit command in virtual world 2 - 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: /exit command in virtual world 2 (
/showthread.php?tid=593996)
/exit command in virtual world 2 -
MayaEU - 12.11.2015
Hello, how do i make this only Work when you are in virtualworld 2?, its /exit command
pawn Код:
if(PlayerToPoint(2,playerid,315.7000,-143.4200,999.60)) // inside Black Market
{
SetPlayerPos(playerid,1489.1200,-1720.1100,8.23);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
return 1;
}
Re: /exit command in virtual world 2 -
MeCom - 12.11.2015
Код:
if(PlayerToPoint(2,playerid,315.7000,-143.4200,999.60) || GetPlayerVirtualWorld(playerid) == 2) // inside Black Market
{
SetPlayerPos(playerid,1489.1200,-1720.1100,8.23);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
return 1;
}
Re: /exit command in virtual world 2 -
thefirestate - 12.11.2015
Usig MeCom's command will make you exit of the black market but it doesn't matter where you are, if you are in LV , LS , all over the map(As long as you are in virtual world 2) , it will still make him exit. If you want this to trigger only if he is at the exit point(The PlayerToPoint thingy) you should use && instead of ||
&& Will get executed if both PlayerToPoint and his virtual world matches.
|| Will get executed if PlayerToPoint matches or virtual world matches.
Re: /exit command in virtual world 2 -
MayaEU - 12.11.2015
Okay, thanks alot, rep+