Postado Abril 3, 2017 8 anos Remoção que impede o uso da talk abaixo se estiver pz. E pedido de talk, !balance, que diz quanto o jogador possui no banco, em vermelho no default. Balance: !balance "Você tem 50000000 no Bank." "Você deve aguardar 1 minuto para utilizar novamente esse comando." function onSay(cid, words, param) local config = { bankSystemEnabled = getBooleanFromString(getConfigInfo('bankSystem')), playerIsFighting = hasCondition(cid, CONDITION_INFIGHT) } if config.bankSystemEnabled == TRUE then if config.playerIsFighting == FALSE then local m = tonumber(param) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.") return TRUE end if(not m) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires numeric param.") return TRUE end m = math.abs(m) if m <= getPlayerBalance(cid) then doPlayerWithdrawMoney(cid, m) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Here you are, " .. m .. " gold. Your account balance is " .. getPlayerBalance(cid) .. ".") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "There is not enough gold on your account.") end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bank can not be used in fight.") return TRUE end else return FALSE end end Editado Abril 3, 2017 8 anos por jNo (veja o histórico de edições) (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Abril 4, 2017 8 anos @jNo não existe nenhum check que impede o uso do talk em pz. Adicionei o time de 60s para usar novamente: Spoiler local config = { bankSystemEnabled = getBooleanFromString(getConfigInfo('bankSystem')), playerIsFighting = hasCondition(cid, CONDITION_INFIGHT), storage = 25635, -- storage do delay time = 60 -- tempo em segundos 60 = 1 min } function onSay(cid, words, param) if getPlayerStorageValue(cid, config.storage) < os.time() then if config.bankSystemEnabled == TRUE then if config.playerIsFighting == FALSE then local m = tonumber(param) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.") return TRUE end if(not m) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires numeric param.") return TRUE end m = math.abs(m) if m <= getPlayerBalance(cid) then doPlayerWithdrawMoney(cid, m) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Here you are, " .. m .. " gold. Your account balance is " .. getPlayerBalance(cid) .. ".") setPlayerStorageValue(cid, config.storage, os.time()+config.time) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "There is not enough gold on your account.") end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bank can not be used in fight.") return TRUE end else return FALSE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait 60 seconds for use the command again.") return false end end
Postado Abril 4, 2017 8 anos Autor 2 horas atrás, KotZletY disse: @jNo não existe nenhum check que impede o uso do talk em pz. Adicionei o time de 60s para usar novamente: Mostrar conteúdo oculto local config = { bankSystemEnabled = getBooleanFromString(getConfigInfo('bankSystem')), playerIsFighting = hasCondition(cid, CONDITION_INFIGHT), storage = 25635, -- storage do delay time = 60 -- tempo em segundos 60 = 1 min } function onSay(cid, words, param) if getPlayerStorageValue(cid, config.storage) < os.time() then if config.bankSystemEnabled == TRUE then if config.playerIsFighting == FALSE then local m = tonumber(param) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.") return TRUE end if(not m) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires numeric param.") return TRUE end m = math.abs(m) if m <= getPlayerBalance(cid) then doPlayerWithdrawMoney(cid, m) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Here you are, " .. m .. " gold. Your account balance is " .. getPlayerBalance(cid) .. ".") setPlayerStorageValue(cid, config.storage, os.time()+config.time) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "There is not enough gold on your account.") end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bank can not be used in fight.") return TRUE end else return FALSE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait 60 seconds for use the command again.") return false end end Deu esse erro assim que abri o server: (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Abril 4, 2017 8 anos @jNo Spoiler local config = { bankSystemEnabled = getBooleanFromString(getConfigInfo('bankSystem')), storage = 25635, -- storage do delay time = 60 -- tempo em segundos 60 = 1 min } function onSay(cid, words, param) if getPlayerStorageValue(cid, config.storage) < os.time() then if config.bankSystemEnabled == TRUE then if hasCondition(cid, CONDITION_INFIGHT) == FALSE then local m = tonumber(param) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.") return TRUE end if(not m) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires numeric param.") return TRUE end m = math.abs(m) if m <= getPlayerBalance(cid) then doPlayerWithdrawMoney(cid, m) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Here you are, " .. m .. " gold. Your account balance is " .. getPlayerBalance(cid) .. ".") setPlayerStorageValue(cid, config.storage, os.time()+config.time) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "There is not enough gold on your account.") end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bank can not be used in fight.") return TRUE end else return FALSE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait 60 seconds for use the command again.") return false end end
Postado Abril 4, 2017 8 anos Autor 13 minutos atrás, KotZletY disse: @jNo Mostrar conteúdo oculto local config = { bankSystemEnabled = getBooleanFromString(getConfigInfo('bankSystem')), storage = 25635, -- storage do delay time = 60 -- tempo em segundos 60 = 1 min } function onSay(cid, words, param) if getPlayerStorageValue(cid, config.storage) < os.time() then if config.bankSystemEnabled == TRUE then if hasCondition(cid, CONDITION_INFIGHT) == FALSE then local m = tonumber(param) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.") return TRUE end if(not m) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires numeric param.") return TRUE end m = math.abs(m) if m <= getPlayerBalance(cid) then doPlayerWithdrawMoney(cid, m) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Here you are, " .. m .. " gold. Your account balance is " .. getPlayerBalance(cid) .. ".") setPlayerStorageValue(cid, config.storage, os.time()+config.time) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "There is not enough gold on your account.") end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bank can not be used in fight.") return TRUE end else return FALSE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait 60 seconds for use the command again.") return false end end Diz que eu não posso usar o comando porque estou pz, só que não estou pz 16:32 Bank can not be used in fight. 16:32 Bank can not be used in fight. 16:32 Bank can not be used in fight. 16:32 Bank can not be used in fight. (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.