Can someone find it for me? :) (+REP) - 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)
+--- Thread: Can someone find it for me? :) (+REP) (
/showthread.php?tid=303021)
Can someone find it for me? :) (+REP) - T0pAz - 11.12.2011
Can someone please find me the sa-mp IsPlayerInRageOfPoint stock. Thank you!
Re: Can someone find it for me? :) (+REP) -
bartje01 - 11.12.2011
It's already included in pawno right?..
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2742.4167,-2229.4236,13.2740))
Re: Can someone find it for me? :) (+REP) - T0pAz - 11.12.2011
Quote:
Originally Posted by bartje01
It's already included in pawno right?..
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2742.4167,-2229.4236,13.2740))
|
Yes I want the stock or the source of that function.
Re: Can someone find it for me? :) (+REP) -
Vince - 11.12.2011
There is no stock or source ... It's a native function.
Re: Can someone find it for me? :) (+REP) -
THE_KNOWN - 11.12.2011
pawn Код:
stock IsPlayerInRangeOfPoint(playerid,radius,Float:x,Float:y,Float:z)
{
new Float:p[3];
GetPlayerPos(playerid,p[0],p[1],p[2]);
new dist = floatsqroot(floatpower(floatabs(floatsub(p[0],x)),2)+floatpower(floatabs(floatsub(p[1],y)),2)+floatpower(floatabs(floatsub(p[2],z)),2));
if(dist < radius) return 1;
return -1;
}
Re: Can someone find it for me? :) (+REP) -
Kostas' - 11.12.2011
pawn Код:
stock IsPlayerInRangeOfPoint(playerid, Float:radius, Float:X, Float:Y, Float:Z)
{
new Float:px,Float:py,Float:pz;
GetPlayerPos(playerid,px,py,pz);
return ( ( ((px-X)*(px-X))+((py-Y)*(py-Y))+((pz-Z)*(pz-Z)) ) >= radius*radius );
}
Re: Can someone find it for me? :) (+REP) - T0pAz - 11.12.2011
THE_KNOW and Kostas' deserves rep.