[HELP] PlayerToPoint bugged?
#1

ok, I have setup a PlayerToPoint system, and after a couple of hours, the text that needs to show up, tot ell the player what to type to enter (like /enter) does not work. does anyone have a solution to this?
Reply
#2

Don't use PlayerToPoint anymore.
0.3 has IsPlayerInRangeOfPoint.
And PlayerToPoint is no bugged. Maybe you gave wrong coords.
Reply
#3

ive tried everything! heres part of my script

Код:
forward PlayerToPoint(Float:radi,playerid,Float:x,Float:y,Float:z);



public OnPlayerCommandText(playerid, cmdtext[])
{
    else if (strcmp("/enter", cmdtext, true) == 0)
	{
	    if(PlayerToPoint(3.0, playerid, 1554.3734,-1675.4396,16.1953)) //LSPD Station
	{
	    GameTextForPlayer(playerid, "~b~ Los Santos Police Department", 3500, 3);
	    SetPlayerInterior(playerid,6);
	    SetPlayerPos(playerid,246.7839,63.9001,1003.6406);
	    return 1;
	}
	    return 1;
	}
	else if (strcmp("/exit", cmdtext, true) == 0)
	{
	    if(PlayerToPoint(3.0, playerid, 246.5264,62.6218,1003.6406)) //LSPD Station
	{
	    SetPlayerInterior(playerid,0);
	    SetPlayerPos(playerid,1552.4254,-1675.5154,16.1953);
		return 1;
	}
	    return 1;
	}
	}
	return 0;
}




public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		tempposx = (oldposx -x);
		tempposy = (oldposy -y);
		tempposz = (oldposz -z);
		if (((tempposx < radi) && (tempposx > -radi))  && ((tempposy < radi) && (tempposy > -radi))  && ((tempposz < radi) && (tempposz > -radi)))
		{
		return 1;
		}
		return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)