Ir para conteúdo

Featured Replies

Postado

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 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

Resolvido por KotZletY

Ir para solução
  • Respostas 7
  • Visualizações 372
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Postado

@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

 

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Postado
  • 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:

 

 

erro.png

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Postado

@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

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Postado
  • 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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo