Ir para conteúdo

Featured Replies

  • Respostas 8
  • Visualizações 1.7k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • se você quiser arrumar o do skill adicione em data\talkactions\talkactions.xml <talkaction log="yes" words="/skill;/addskill" access="5" event="script" value="skill.lua"/> da

Postado

se você quiser arrumar o do skill adicione em

data\talkactions\talkactions.xml



    <talkaction log="yes" words="/skill;/addskill" access="5" event="script" value="skill.lua"/>

data\talkactions\scripts\skill.lua

function onSay(cid, words, param, channel)

if(param == '') then

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

  return true

end

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

if(not t[2]) then

  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.")

  return true

end

local pid = getPlayerByNameWildcard(t[1])

if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then

  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")

  return true

end

t[2] = t[2]:lower()

local skill = SKILL_IDS[t[2]]

if(not skill) then

  local tmp = t[2]:sub(1, 1)

  if(tmp == 'l' or tmp == 'e') then

   skill = SKILL__LEVEL

  elseif(tmp == 'm') then

   skill = SKILL__MAGLEVEL

  else

   skill = tonumber(t[2])

   if(not skill or skill < SKILL_FIRST or SKILL > SKILL__LAST) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such skill does not exists.")

    return true

   end

  end

end

local amount = tonumber(t[3])

if(not amount or amount == 0) then

  amount = 1

end

doPlayerAddSkill(pid, skill, amount, true)

return true

end

Postado
  • Autor

Troca sua database! ; )

POderia ser mais claro ? :S sou novo aqui

se você quiser arrumar o do skill adicione em

data\talkactions\talkactions.xml



<talkaction log="yes" words="/skill;/addskill" access="5" event="script" value="skill.lua"/>

data\talkactions\scripts\skill.lua

function onSay(cid, words, param, channel)

if(param == '') then

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

return true

end

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

if(not t[2]) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.")

return true

end

local pid = getPlayerByNameWildcard(t[1])

if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")

return true

end

t[2] = t[2]:lower()

local skill = SKILL_IDS[t[2]]

if(not skill) then

local tmp = t[2]:sub(1, 1)

if(tmp == 'l' or tmp == 'e') then

skill = SKILL__LEVEL

elseif(tmp == 'm') then

skill = SKILL__MAGLEVEL

else

skill = tonumber(t[2])

if(not skill or skill < SKILL_FIRST or SKILL > SKILL__LAST) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such skill does not exists.")

return true

end

end

end

local amount = tonumber(t[3])

if(not amount or amount == 0) then

amount = 1

end

doPlayerAddSkill(pid, skill, amount, true)

return true

end

Vlw mano deu certo aqui :D REP +

Editado por Fausto32 (veja o histórico de edições)

          Procuro Equipe para projeto sério com remuneração, maior necessidade Programador em C\C++.

Postado
  • Autor

Problema Do /addskill arumado :) HELP no de frags ae quem souber ? :D

Editado por Fausto32 (veja o histórico de edições)

          Procuro Equipe para projeto sério com remuneração, maior necessidade Programador em C\C++.

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