function sampev.onPlayerChatBubble(playerid, color, distance, duration, message)
local result, ped = sampGetCharHandleBySampPlayerId(playerid)
if not result then return true end
local x, y, z = getCharCoordinates(PLAYER_PED)
local tx, ty, tz = getCharCoordinates(ped)
local distance = getDistanceBetweenCoords3d(x, y, z, tx, ty, tz)
sampAddChatMessage(("Chat bubble showing on player[%d] on distance: %.2f"):format(playerid, distance), -1)
end