#1

How to get if player is near player?
Reply
#2

Using this:
pawn Код:
stock IsPlayerNearPlayer(playerid, id, Float: distance)
{
    new Float: pos[3];
    GetPlayerPos( id, pos[0], pos[1], pos[2] );
    if(IsPlayerInRangeOfPoint(playerid, distance, pos[0], pos[1], pos[2]))
    {
        if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(id) || GetPlayerInterior(playerid) == GetPlayerInterior(id))
        {
            return 1;
        }
    }
    return 0;
}
And now, all you have to do is using IsPlayerNearPlayer(player1, player2, distance)
Reply
#3

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)