SA-MP Forums Archive
[HELP] I just get an error when I try to do this... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] I just get an error when I try to do this... (/showthread.php?tid=79246)



[HELP] I just get an error when I try to do this... - FreddeN - 26.05.2009

What can I to fix this error:

error 017: undefined symbol "PlayerToPoint"

The scrpt is:

Код:
	if (strcmp("/enter", cmdtext, true) == 0)
	{
		if(PlayerToPoint(5.0, playerid, 1568.5195,-1690.6931,5.8906))
		SetPlayerPos(playerid, 615.2851,-124.2390,997.6350);
		SetPlayerInterior(playerid, 3);
		return 1;
	}
}




Re: [HELP] I just get an error when I try to do this... - miokie - 26.05.2009

Get the PlayerToPoint function,
It is defiantly soemwher here on the forums, just search for it


Re: [HELP] I just get an error when I try to do this... - woot - 26.05.2009

pawn Код:
PlayerToPoint(Float:radius, playerid, Float:X, Float:Y, Float:Z)
{
  new Float:oldpos[3], Float:temppos[3];
  GetPlayerPos(playerid, oldpos[0], oldpos[1], oldpos[2]);
  temppos[0] = (oldpos[0] -X);
  temppos[1] = (oldpos[1] -Y);
  temppos[2] = (oldpos[2] -Z);
  if(((temppos[0] < radius) && (temppos[0] > -radius)) && ((temppos[1] < radius) && (temppos[1] > -radius)) && ((temppos[2] < radius) && (temppos[2] > -radius)))
  {
    return true;
  }
  return false;
}
also ..

pawn Код:
if (strcmp("/enter", cmdtext, true) == 0)
{
    if(PlayerToPoint(5.0, playerid, 1568.5195,-1690.6931,5.8906))
    {
        SetPlayerPos(playerid, 615.2851,-124.2390,997.6350);
        SetPlayerInterior(playerid, 3);
        return 1;
    }
}



Re: [HELP] I just get an error when I try to do this... - Anthony_Brassi - 03.09.2009

EDIT:Fixed it