14.03.2014, 22:47
Quote:
Here is the call back that i am using for it and sorry for late reply i was sleeping at the time
pawn Код:
|
pawn Код:
GetDistanceBetweenPlayers(playerid, otherid, Float:dist)
{
new
Float:Pos[3]
;
if( IsPlayerConnected( targetid ) && IsPlayerConnected( otherid ) )
{
GetPlayerPos( otherid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
IsPlayerInRangeOfPoint( playerid, dist, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
return true;
}
return false;
}
pawn Код:
if( !GetDistanceBetweenPlayers(playerid, otherid, Float:dist) ) //if the player is not near.
if( GetDistanceBetweenPlayers(playerid, otherid, Float:dist) ) //if the player is near.