29.07.2012, 13:29
https://sampwiki.blast.hk/wiki/GetPlayerPos
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
https://sampwiki.blast.hk/wiki/Function:...erControllable
for u
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
https://sampwiki.blast.hk/wiki/Function:...erControllable
pawn Код:
forward IsCopNearSuspect(playerid);
public IsCopNearSuspect(playerid)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 5, X, Y, Z))
{
//Your code here
}
}
}
return 1;
}