Distance from that player
#4

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;
}
Reply


Messages In This Thread
Distance from that player - by Lajko1 - 12.09.2013, 12:21
Re: Distance from that player - by Lajko1 - 12.09.2013, 14:56
Re: Distance from that player - by PrivatioBoni - 12.09.2013, 14:58
Re: Distance from that player - by DanishHaq - 12.09.2013, 15:00
Re: Distance from that player - by Lajko1 - 12.09.2013, 16:20
Re: Distance from that player - by DanishHaq - 12.09.2013, 16:22
AW: Distance from that player - by Skimmer - 12.09.2013, 16:39
Re: Distance from that player - by Lajko1 - 12.09.2013, 17:22
Re: Distance from that player - by Lajko1 - 12.09.2013, 19:50
Re: Distance from that player - by Konstantinos - 12.09.2013, 20:00

Forum Jump:


Users browsing this thread: 3 Guest(s)