Checking if a player is close
#3

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(PLAYER_ID_NUMBER_ONE, x, y, z);

if(IsPlayerInRangeOfPoint(PLAYER_ID_NUMBER_TWO, 2.0, x, y, z))
{
    // They are within 2.0 units
}
https://sampwiki.blast.hk/wiki/GetPlayerDistanceFromPoint

pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(PLAYER_ID_NUMBER_ONE, x, y, z);

if(GetPlayerDistanceFromPoint(PLAYER_ID_NUMBER_TWO, x, y, z) < 2.0)
{
    // They are within 2.0 units
}
Reply


Messages In This Thread
Checking if a player is close - by liam1412 - 02.04.2013, 17:46
Re: Checking if a player is close - by brawrr - 02.04.2013, 17:51
Re: Checking if a player is close - by Finn - 02.04.2013, 19:06
Re: Checking if a player is close - by MP2 - 02.04.2013, 19:31
Re: Checking if a player is close - by liam1412 - 03.04.2013, 06:25

Forum Jump:


Users browsing this thread: 1 Guest(s)