14.03.2013, 00:49
like this ?
pawn Код:
stock IsPlayerNearPlayer(playerid, targetid, Float:radius)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, radius ,x, y, z))
{
return 1;
}
return 0;
}
//but typically its just the playerid u want to the target and the distance
if(IsPlayerNearPlayer(playerid, 5, 10.0))
{
SendClientMessage(playerid, COLOR_RED, "No Players Close Enough To Rape."
}