12.09.2013, 15:00
Use something like this:
pawn Код:
new giveplayerid; // this would be your other player's ID variable, but change it to your own...
new Float:x, Float:y, Float:z; // float positions
GetPlayerPos(playerid, Float:x, Float:y, Float:z); // Get the officer's position
if(IsPlayerInRangeOfPoint(giveplayerid, 5.0, x, y, z); // If the giveplayerid is in the range of the radius 5 from the playerid
{
// Your code for the arrest command
return 1;
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not near that player.");
return 1;
}