Ir para conteúdo
  • Cadastre-se

(Resolvido)Remover função de script e pedido


Ir para solução Resolvido por KotZletY,

Posts Recomendados

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

Link para o post
Compartilhar em outros sites

@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

Link para o post
Compartilhar em outros sites
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

Link para o post
Compartilhar em outros sites

@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

Link para o post
Compartilhar em outros sites
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

Link para o post
Compartilhar em outros sites
  • Solução

@jNo cara traduz o texto cara, ta dizendo ae que você não pode usar em battle, e não em pz! :7943e5822524b7fb194f46d626fb2fb7:

Não vai te matar entrar no google tradutor e traduzir esse texto cara.

 

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
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
else
return FALSE
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait 60 seconds for use the command again.")
return false
end

end

 

Removi o check.

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

Link para o post
Compartilhar em outros sites
40 minutos atrás, KotZletY disse:

@jNo cara traduz o texto cara, ta dizendo ae que você não pode usar em battle, e não em pz! :7943e5822524b7fb194f46d626fb2fb7:

Não vai te matar entrar no google tradutor e traduzir esse texto cara.

 

  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
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
else
return FALSE
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait 60 seconds for use the command again.")
return false
end

end

 

Removi o check.

 

Amigo, não funcionava de nenhuma forma essa merda, e outra, se preocupa menos em responder os tópicos dos outros com hostilidade, e foca em resolver a dúvida dos usuários, esse é o proposito do fórum, flw

 

E obrigado mais uma vez

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

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

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

Link para o post
Compartilhar em outros sites

@jNo errado, você ta com o problema, mas não soube expressar, ao menos deveria ter colocado muito antes o texto mandado, ou deveria ter pensado "to usando fora do pz, e não ta funcionando", então não é com pz o problema. Você deveria ter traduzido, ou deduzido que não era o pz, pois não tem nem a palavra "pz" escrita. Hu3hu3hu3.

 

Em fim, até, que bom que funcionou.

 

 

Até a próxima! xD

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

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo