06.04.2011, 19:53
pawn Код:
stock IsPlayerInMyRange(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) {
return true;
}
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) {
return true;
}
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) {
return true;
}
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) {
return true;
}
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) {
return true;
}
return false;
}
Use it like this
pawn Код:
if(IsPlayerInMyRange(playerid)) {
//Functions
}