Friends / Name Tag System
#7

It's a function I got from the forums here

pawn Код:
forward IsPlayerNearPlayer(playerid, n_playerid, Float:radius);
IsPlayerNearPlayer(playerid, n_playerid, Float:radius)
{
    new Float:npx, Float:npy, Float:npz;
    GetPlayerPos(n_playerid, npx, npy, npz);
    if(IsPlayerInRangeOfPoint(playerid, radius, npx, npy, npz))
    {
        return true;
    }
    return false;
}
As far as I know, it should work. At first I tried with IsPlayerInRangeOfPoint, which would work, but I figured this was easier to use. I don't have to get the position all the time, which makes it easier. And the code looks pretty fine to me.

Anyways, is there anything wrong with my loop?
Reply


Messages In This Thread
Friends / Name Tag System - by Knappen - 19.10.2011, 12:10
Re: Friends / Name Tag System - by Knappen - 19.10.2011, 19:45
Re: Friends / Name Tag System - by Knappen - 20.10.2011, 06:43
Re: Friends / Name Tag System - by nilanjay - 20.10.2011, 06:54
Re: Friends / Name Tag System - by Knappen - 20.10.2011, 21:23
Re: Friends / Name Tag System - by =WoR=Varth - 20.10.2011, 21:57
Re: Friends / Name Tag System - by Knappen - 20.10.2011, 22:11

Forum Jump:


Users browsing this thread: 2 Guest(s)