11.11.2014, 15:44
Hello.
I've founded in some script this function:
It seems that it's the same as IsPlayerInRangeOfPoint.
So, is there any point of using this custom function, or it's really stupid? (I think it is.)
Sorry for my English.
I've founded in some script this function:
pawn Код:
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
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;
}
So, is there any point of using this custom function, or it's really stupid? (I think it is.)
Sorry for my English.