potential issue fix with isnotnearplayer

This commit is contained in:
Lorenc Pekaj 2018-10-10 16:13:45 +11:00
parent 3dd5ec63c9
commit 17285c5251

View File

@ -17039,8 +17039,11 @@ stock isNotNearPlayer( playerid, nearid, Float: distance = 200.0 )
new
Float: X, Float: Y, Float: Z;
GetPlayerOutsidePos( nearid, X, Y, Z );
if ( GetPlayerInterior( playerid ) == GetPlayerInterior( nearid ) && GetPlayerVirtualWorld( playerid ) == GetPlayerVirtualWorld( nearid ) ) {
GetPlayerPos( nearid, X, Y, Z );
} else {
GetPlayerOutsidePos( nearid, X, Y, Z );
}
return GetPlayerDistanceFromPoint( playerid, X, Y, Z ) > distance ? 1 : 0;
}