IsPlayerInRangeOfPoint
#1

Is possible to add virtual world to IsPlayerInRangeOfPoint ?
For example i am at VW 2 i can use the command, if I'm not in the VW 2 i cant use!
I need it because i am using an interior at 3 zones and i always exit in the first one! :S
Reply
#2

would using IsPlayerInRangeOfPoint then inside of that checking what virtual world they're in work?
Код:
if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z) && GetPlayerVirtualWorld(playerid) == 3)
{
      // whatever
}
Reply
#3

The problem is: I am using Airport Interior in LS, LV and SF, the same interior!
And when i exit the interior i exit always in LS Airport becase the LS Script comes first!

edit:

Код:
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 1642.24,-2334.49,13.55))
		{//Airport LS Entrance
			PlayerInfo[playerid][pInteriorNr] = 1;
			GameTextForPlayer(playerid, "~w~Airport LS", 5000, 1);
			SafeSetPlayerInterior(playerid, 1);
			SetPlayerVirtualWorld(playerid, 1);
			SafeSetPlayerPos(playerid,1373.18,4.34,1000.98);
			SetPlayerFacingAngle(playerid, 0);
			TogglePlayerControllable(playerid, 0);
			SetTimerEx("Unfreezeply",1500,false,"i",playerid);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 1373.18,4.34,1000.98))
		{//Airport LS Exit
		    PlayerInfo[playerid][pInteriorNr] = 17;
			GameTextForPlayer(playerid, "~w~Los Santos", 5000, 1);
			SafeSetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
			SafeSetPlayerPos(playerid,1642.24,-2334.49,13.55);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, -1421.63,-288.15,14.15))
		{//Airport SF Entrance
			PlayerInfo[playerid][pInteriorNr] = 2;
			GameTextForPlayer(playerid, "~w~Airport SF", 5000, 1);
			SafeSetPlayerInterior(playerid, 2);
			SetPlayerVirtualWorld(playerid, 2);
			SafeSetPlayerPos(playerid,1373.18,4.34,1000.98);
			SetPlayerFacingAngle(playerid, 0);
			TogglePlayerControllable(playerid, 0);
			SetTimerEx("Unfreezeply",1500,false,"i",playerid);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 1373.18,4.34,1000.98))
		{//Airport SF Exit
		    PlayerInfo[playerid][pInteriorNr] = 0;
			GameTextForPlayer(playerid, "~w~San Fierro", 5000, 1);
			SafeSetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
			SafeSetPlayerPos(playerid,-1421.63,-288.15,14.15);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 1675.37,1447.75,10.79))
		{//Airport LV Entrance
			PlayerInfo[playerid][pInteriorNr] = 3;
			GameTextForPlayer(playerid, "~w~Airport LV", 5000, 1);
			SafeSetPlayerInterior(playerid, 3);
			SetPlayerVirtualWorld(playerid, 3);
			SafeSetPlayerPos(playerid,1373.18,4.34,1000.98);
			SetPlayerFacingAngle(playerid, 0);
			TogglePlayerControllable(playerid, 0);
			SetTimerEx("Unfreezeply",1500,false,"i",playerid);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1, 1373.18,4.34,1000.98))
		{//Airport LV Exit
		    PlayerInfo[playerid][pInteriorNr] = 0;
			GameTextForPlayer(playerid, "~w~Las Venturas", 5000, 1);
			SafeSetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);
			SafeSetPlayerPos(playerid,1675.37,1447.75,10.79);
Reply
#4

You could try setting a variable for the player when they enter it.
like if they enter from LV you set it to 1
then when they exit you check if the vaiable is 1, 2 or 3
Reply
#5

I got this error when adding && GetPlayerVirtualWorld(playerid) == VW)

Код:
(77475) : error 029: invalid expression, assumed zero
(77486) : error 029: invalid expression, assumed zero
(77486) : warning 215: expression has no effect
(77486) : error 001: expected token: ";", but found "if"
(77494) : error 029: invalid expression, assumed zero
(77505) : error 029: invalid expression, assumed zero
(77505) : warning 215: expression has no effect
(77505) : error 001: expected token: ";", but found "if"
(77513) : error 029: invalid expression, assumed zero
(77524) : error 029: invalid expression, assumed zero
(77524) : warning 215: expression has no effect
(77524) : error 001: expected token: ";", but found "if"
Reply
#6

show me which lines are 77475-77486
Reply
#7

problem solved!
Thanks alot man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)