// 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
|
Look at your IsPlayerInRangeOfPoint for both exit commands. They are the same.
|