error 004: function "PlayerToPoint" is not implemented - 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: error 004: function "PlayerToPoint" is not implemented (
/showthread.php?tid=110771)
error 004: function "PlayerToPoint" is not implemented -
addmion - 28.11.2009
Code:
F:\GF3.pwn(4656) : error 004: function "PlayerToPoint" is not implemented
F:\GF3.pwn(4660) : error 004: function "PlayerToPoint" is not implemented
F:\GF3.pwn(4725) : error 004: function "PlayerToPoint" is not implemented
F:\GF3.pwn(4729) : error 004: function "PlayerToPoint" is not implemented
F:\GF3.pwn(4741) : error 004: function "PlayerToPoint" is not implemented
Code:
4660:else if(PlayerToPoint(40,playerid,2126.457519,-1152.129272,23.869300)||PlayerToPoint(40,playerid,1054.454345,-909.379272,42.562801)||PlayerToPoint(40,playerid,1623.161132,-1896.359497,13.122594))
Code:
4725:if(PlayerToPoint(25.0,playerid,207.5627,-103.7291,1005.2578) || PlayerToPoint(25.0,playerid,203.9068,-41.0728,1001.8047))
Code:
4729:else if(PlayerToPoint(30.0,playerid,214.4470,-7.6471,1001.2109) || PlayerToPoint(50.0,playerid,161.3765,-83.8416,1001.8047))
Code:
4741:if(PlayerToPoint(6.2, playerid, 326.8956,186.0858,1014.1875) || PlayerToPoint(6.0,playerid,374.1812,191.2544,1014.1875) || PlayerToPoint(5.2,playerid,327.7716,153.3677,1014.1875))
Re: error 004: function "PlayerToPoint" is not implemented -
Remi-X - 28.11.2009
Better to use
IsPlayerInRangeOf, since SA:MP 0.3a is out.
Re: error 004: function "PlayerToPoint" is not implemented -
Correlli - 28.11.2009
Make sure you have PlayerToPoint function in your script or just do as Remi-X told you.
Re: error 004: function "PlayerToPoint" is not implemented -
Luka P. - 28.11.2009
Copy this at bottom of your script
pawn Code:
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;
}