09.05.2014, 21:04
Hey guys i put this marker as DynamicObject in the interiors, what callback should i use? to check if the player in the marker or not ? to send him to outside of the interior.
Another method ? :)
CreatePickup(1559, 1, 0.0, 0.0, 5.0, -1); public OnPlayerPickUpPickup(playerid, pickupid) |
If the virtual world change the coordinates wont change, and you still can check if the player is at X,Y,Z location what is wrong with that?
|
if(IsPlayerInRangeOfPoint(playerid, 1.0, -12.232, 145.22, 14.2222) //The object that is in the store of LV (Virual World = 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 43.44, 23.665, 3433.444); //outside the store that is in LV
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, -12.232, 145.22, 14.2222) //The object that is in the store of SF (Same Coordinates) (Virual World = 2)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 234.4222, 2343.2303, 2346.4421); //Not same coordinates because this store's outside in SF not LV
}
//So it will make a bug because IsPlayerInRangeOfPoint has the same coordinates but different outside coordinates, so that's the problem.
if(IsPlayerInRangeOfPoint(playerid, 1.0, -12.232, 145.22, 14.2222) //The object that is in the store of LV (Virual World = 1)
{
if(GetPlayerVirtualWorld(playerid) == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 43.44, 23.665, 3433.444); //outside the store that is in LV
}
}