SA-MP Forums Archive
Bugged /exit - 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: Bugged /exit (/showthread.php?tid=257258)



Bugged /exit - OverDrive Gaming - 25.05.2011

I'm not too sure what I did wrong here... /enter works fine at both of the enter points. But /exit takes me back to the one in Pershing Square... Can I get some help?


Код:
// PERSHING SQUARE  /ENTER & /EXIT COMMANDS - START

	if (strcmp("/enter", cmdtext, true, 6) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 4, 1412.1007, -1699.9229, 13.5395))
            {
                SetPlayerPos(playerid, 1753.5143, -1691.5734, -14.6642);
                SendClientMessage(playerid, 0xFFFFFFFFF, "{FF0000} Robotic Voice: Welcome to the FDSA Main Headquarters!");
				SetPlayerVirtualWorld(playerid, 10);
                return 1;
            }
    }
    
	if (strcmp("/exit", cmdtext, true, 6) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 4, 1753.5143, -1691.5734, -14.6642))
            {
                SetPlayerPos(playerid, 1412.1007, -1699.9229, 13.5395);
                SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000} Robotic Voice: We hope you enjoyed your stay!");
				SetPlayerVirtualWorld(playerid, 0);

				return 1;
            }

    }
	
// PERSHING SQUARE /ENTER & /EXIT COMMANDS - END














// SAN FIERRO /ENTER & /EXIT COMMANDS - START

	if (strcmp("/enter", cmdtext, true, 7) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 4, -2026.7957, 67.0609, 28.6916))
            {
                SetPlayerPos(playerid, 1753.5143, -1691.5734, -14.6642);
                SendClientMessage(playerid, 0xFFFFFFFFF, "{FF0000} Robotic Voice: Welcome to the FDSA Main Headquarters!");
                SetPlayerVirtualWorld(playerid, 11);
                return 1;
            }
    }

	if (strcmp("/exit", cmdtext, true, 7) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 4, 1753.5143, -1691.5734, -14.6642))
            {
                SetPlayerPos(playerid, -2026.7957, 67.0609, 28.6916);
                SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000} Robotic Voice: We hope you enjoyed your stay!");
				SetPlayerVirtualWorld(playerid, 0);
                return 1;
            }

    }


//SAN FIERRO /ENTER & /EXIT COMMANDS - END



Re: Bugged /exit - Tee - 25.05.2011

Look at your IsPlayerInRangeOfPoint for both exit commands. They are the same.


Re: Bugged /exit - HammerSmith - 25.05.2011

Quote:
Originally Posted by Tee
Посмотреть сообщение
Look at your IsPlayerInRangeOfPoint for both exit commands. They are the same.
It's me, on a different account. But anyways, it's because it's going into the same interior. Just different virtual worlds... I think..