Hey guys im noob to this but i think you guys can help me with it.
I have maked it so i can enter from two different places. Like One in idlewood and one in jerry motel.
they both go to Jerry's motel interior but its two different world ids. and if i enter the one in jerry and exit it. I come to the one in idlewood.
How can i make it so it saveґs that i enterґed that one in idlewood and when i exit i gonna be teleported to the one in idlewood again...
Код:
CMD:enter(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2248.0684,-1796.0315,13.5469,89.3518))
{
SetPlayerPos(playerid, 2215.3606,-1150.6021,1025.7969,269.9276);//AmmunationEntrance
SetPlayerVirtualWorld(playerid, 1);
SetPlayerInterior(playerid, 15);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2274.7229,-1785.7144,13.5469,271.4001))
{
SetPlayerPos(playerid, 773.579956,-77.096694,1000.655029);//GantonGymEntrance
SetPlayerVirtualWorld(playerid, 2);
SetPlayerInterior(playerid, 7);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1284.6202,-1585.2909,13.5469))
{
SetPlayerPos(playerid, -2029.798339,-106.675910,1035.171875);//LicenseCenterEntrance
SetPlayerInterior(playerid, 3);
}
return 1;
}
CMD:exit(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2215.3606,-1150.6021,1025.7969,269.9276))
{
SetPlayerPos(playerid, 2248.0684,-1796.0315,13.5469,89.3518);//AmmunationExit
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2215.3606,-1150.6021,1025.7969,269.9276))
{
SetPlayerPos(playerid, 2274.7229,-1785.7144,13.5469,271.4001);//AmmunationExit
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 773.579956,-77.096694,1000.655029))
{
SetPlayerPos(playerid, 2229.5374,-1721.7302,13.5658);//GantonGymExit
SetPlayerInterior(playerid, 0);
}
return 1;
}
In both of the same interiors, set virtual world when player enters.
And when they exit, check if the virtual world is the one you settled for the exact exit/entrance
Thanks. But i have another problem also...