Ir para conteúdo

(RESOLVIDO) Talkaction /i - Criar itens [ Erro Grave ]

Featured Replies

Postado

Galera quando dou /i para criar o item ele da critical no server e server cai =s , olha o codigo ai

Codigo Createitem.php

function onSay(cid, words, param, channel)

if(param == '') then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")

return true

end

local t = string.explode(param, ",")

local ret = RETURNVALUE_NOERROR

local pos = getCreaturePosition(cid)

local id = tonumber(t[1])

if(not id) then

id = getItemIdByName(t[1], false)

if(not id) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")

return true

end

end

local amount = 100

if(t[2]) then

amount = t[2]

end

local item = doCreateItemEx(id, amount)

if(t[3] and getBooleanFromString(t[3])) then

if(t[4] and getBooleanFromString(t[4])) then

pos = getCreatureLookPosition(cid)

end

ret = doTileAddItemEx(pos, item)

else

ret = doPlayerAddItemEx(cid, item, true)

end

if(ret ~= RETURNVALUE_NOERROR) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1])

return true

end

doDecayItem(item)

if(not isPlayerGhost(cid)) then

doSendMagicEffect(pos, CONST_ME_MAGIC_RED)

end

return true

end

OBS: Uso o TFS 4, funcionava tudo certo no outro distro agora que coloquei no TFS 4 apareceu inumeras falhas

  • Respostas 9
  • Visualizações 927
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Nem vo fala nada veio se tem eu no face e nem manda pm pra eu arrumar isso pra vc abrir o server manda fexa isso que eu arrumo pra vc ¬¬

Postado

Coloca esse aqui pra ver se o erro sai:



function onSay(cid, words, param, channel)

if(param == '') then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")

return true

end


local t = string.explode(param, ",")

local ret = RETURNVALUE_NOERROR

local pos = getCreaturePosition(cid)


local id = tonumber(t[1])

if(not id) then

id = getItemIdByName(t[1], false)

if(not id) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")

return true

end

end


local amount = 100

if(t[2]) then

amount = t[2]

end


local item = doCreateItemEx(id, amount)

if(t[3] and getBooleanFromString(t[3])) then

if(t[4] and getBooleanFromString(t[4])) then

pos = getCreatureLookPosition(cid)

end


ret = doTileAddItemEx(pos, item)

else

ret = doPlayerAddItemEx(cid, item, true)

end


if(ret ~= RETURNVALUE_NOERROR) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1])

return true

end


doDecayItem(item)

if(not isPlayerGhost(cid)) then

doSendMagicEffect(pos, CONST_ME_MAGIC_RED)

end


return true

end

Postado

Nem vo fala nada veio se tem eu no face e nem manda pm pra eu arrumar isso pra vc abrir o server manda fexa isso que eu arrumo pra vc ¬¬

Cara, o fórum ta aqui pra isso, pra suporte!

Agora é proibido tirar duvidas no fórum? Tem que se exclusivamente com você? -.-

Essa duvida pode ser também de outras pessoas, e caso o erro seja solucionado aqui as outras pessoas que possuem o mesmo erro terão a oportunidade de encontrar a solução...

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.6k

Informação Importante

Confirmação de Termo