29.07.2012, 13:39
Quote:
https://sampwiki.blast.hk/wiki/GetPlayerPos
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint https://sampwiki.blast.hk/wiki/Function:...erControllable pawn Код:
|
Try:
pawn Код:
stock IsPlayerNearSuspect(playerid, suspectid, Float:range)
{
new bool:isNear = false;
if(IsPlayerConnected(playerid) && IsPlayerConnected(suspectid)) {
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
if(IsPlayerInRangeOfPoint(suspectid, range, pX, pY, pZ)) {
isNear = true;
}
}
return isNear;
}