function Get_Distance(event, player, message, type, language)local message = string.lower(message)if (message == "yards") thenplayer:SendBroadcastMessage("It's "..player:GetDistanceYards(player:GetSelection()).." yards to your target.")endendRegisterServerHook(16, "Get_Distance")
{ "distance", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleGetDistanceCommand>, "", NULL },
Your script might fail without selection btw.