Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 10/16/22 em todas áreas

  1. 1 ponto
    testou esse script que fiz e deu reload talk? local config = { storage = 19400, -- storage em que será salvo o tempo cor = "red", -- de acordo com o constant.lua da lib tempo = 3, -- em minutos price = 20000, -- quantidade de dinheiro que irá custar level = 10 -- level pra poder utilizar o broadcast } function onSay(cid, words, param) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then if doPlayerRemoveMoney(cid, config.price) then setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*10)) local pid = getPlayersOnline() for i=1, #pid do doPlayerSendTextMessage(pid[i], MESSAGE_STATUS_CONSOLE_RED, "[/all]: ["..getCreatureName(cid).."]: "..param.."") end else doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.") return true end else doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.") return true end else doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.") end return true end
  2. 1 ponto
    Se o objetivo é enviar a mensagem para todos os players, somente no DEFAULT. (sem que apareça no meio da tela / server log). Veja se desta forma, o problema é ou não resolvido: local config = { storage = 19400, -- storage em que será salvo o tempo cor = "red", -- de acordo com o constant.lua da lib tempo = 3, -- em minutos price = 20000, -- quantidade de dinheiro que irá custar level = 10 -- level pra poder utilizar o broadcast } function onSay(cid, words, param, channel) if(param == '') then -- Mensagem em branco. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) < config.level then -- Caso o player seja level abaixo do que o permitido. doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.") return true end if getPlayerStorageValue(cid, config.storage) - os.time() >= 1 then -- Caso o player use o comando antes do tempo de espera. doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.") return true end if not doPlayerRemoveMoney(cid, config.price) then -- Caso o player não tenha dinheiro o suficiente. doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.") return true end --== Caso esteja tudo certo ==-- setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*60)) for _, pid in ipairs(getPlayersOnline()) do doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_RED, getCreatureName(cid)..": "..param) end return true end
  3. 1 ponto
    Boa noite, eu tenho um script similar ao que você precisa no meu servidor. <talkaction log="yes" words="/all" event="script" value="nome do script.lua"/> local config = { storage = 19400, -- storage em que sera salvo o tempo cor = "green", -- de acordo com o constant.lua da sua lib tempo = 10, -- em minutos price = 200000, -- quantidade de dinheiro que ira custar level = 700 -- level pra poder utilizar o broadcast } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then if doPlayerRemoveMoney(cid, config.price) then setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*60)) doBroadcastMessage(""..getCreatureName(cid).." [ANUNCIO]: "..param.."", config.cor) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Voce mandou um anuncio com sucesso, agora voce precisa esperar " ..config.tempo.. " minuto(s) para mandar ou anuncio.") else doPlayerSendCancel(cid, "Voce nao tem " ..config.price.. " gp's for broadcasting.") return true end else doPlayerSendCancel(cid, "Voce precisa esperar " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " segundos para mandar outro anuncio.") return true end else doPlayerSendCancel(cid, "Voce precisa ser " ..config.level.. " ou mais para mandar um broadcast.") end end
  4. 1 ponto
    sua source nao deve ter a função de mandar no default então, vai ter que fazer isso de outra forma Tenta assim: local config = { storage = 19400, -- storage em que será salvo o tempo cor = "red", -- de acordo com o constant.lua da lib tempo = 3, -- em minutos price = 20000, -- quantidade de dinheiro que irá custar level = 10 -- level pra poder utilizar o broadcast } function onSay(cid, words, param) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then if doPlayerRemoveMoney(cid, config.price) then setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*10)) local pid = getPlayersOnline() for i=1, #pid do doPlayerSendTextMessage(pid[i], MESSAGE_STATUS_CONSOLE_RED, "[/all]: ["..getCreatureName(cid).."]: "..param.."") end else doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.") return true end else doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.") return true end else doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.") end return true end
  5. Global 8.6 com varias atualizações do 12

    koyotestark reagiu a Damatio por uma resposta no tópico

    1 ponto
    https://github.com/AlissonRenna/order-global
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo