Gets the nearest player to an object.
LABEL Get Nearest - EB
SET R6 1e+20
SET R4 255
SET R7 0
LABEL Loop
LESS R5 R7 Player.Count
NOT R5 R5
IF R5 Done
SET Player.SelIndex R7
EQUAL R5 Player.Valid 1
NOT R5 R5
IF R5 Next
SUB R0 Player.Pos.X Obj.Pos.X
SUB R1 Player.Pos.Y Obj.Pos.Y
SUB R2 Player.Pos.Z Obj.Pos.Z
MUL R0 R0 R0
MUL R1 R1 R1
MUL R2 R2 R2
ADD R3 R0 R1
ADD R3 R3 R2
LESS R5 R3 R6
IF R5 Update
LABEL Next
ADD R7 R7 1
GOTO Loop
LABEL Update
SET R6 R3
SET R4 Player.Id
GOTO Next
LABEL Done
SET sgn1.Sign.Number R4
SLEEP 0
GOTO Get Nearest - EB