function onSay(player, words, param) if not player:hasFlag(PlayerFlag_CanBroadcast) then return true end if param == '' then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end -- Permitir formato: color | mensaje local color, message = param:match("^(%w+)%s*|%s*(.+)$") if color and message then param = color .. "|" .. message end local MESSAGE_STATUS_WARNING = 20 -- Enviar el mensaje a todos los jugadores con el modo correcto. for _, targetPlayer in ipairs(Game.getPlayers()) do targetPlayer:sendTextMessage(MESSAGE_STATUS_WARNING, param) end print("> " .. player:getName() .. " broadcasted: \"" .. param .. "\".") return false end