Can someone find it for me? :) (+REP)
#1

Can someone please find me the sa-mp IsPlayerInRageOfPoint stock. Thank you!
Reply
#2

It's already included in pawno right?..

if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2742.4167,-2229.4236,13.2740))
Reply
#3

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.
Reply
#4

There is no stock or source ... It's a native function.
Reply
#5

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;
}
Reply
#6

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 );
}
Reply
#7

THE_KNOW and Kostas' deserves rep.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)