28.03.2011, 03:13
How to get if player is near player?
stock IsPlayerNearPlayer(playerid, id, Float: distance)
{
new Float: pos[3];
GetPlayerPos( id, pos[0], pos[1], pos[2] );
if(IsPlayerInRangeOfPoint(playerid, distance, pos[0], pos[1], pos[2]))
{
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(id) || GetPlayerInterior(playerid) == GetPlayerInterior(id))
{
return 1;
}
}
return 0;
}