Ir para conteúdo
  • 0

Preciso De 1 Script Que Adciona Health e Mana No Player!


Maenilse

Pergunta

Bom Galera Nao Sei Se è Area Correto Ou Nao, Se Nao For Por Favor Movam.

 

Queria 1 Script Que Qnd Eu Falar, /addhealth player, 500 ou /addmana player, 500.

 

Adciona 500 Health Ou Mana No Player, Nao Sei Se è Possivel, Aguardo Respostas...

 

REP+ Se Conseguirem

Link para o comentário
Compartilhar em outros sites

9 respostass a esta questão

Posts Recomendados

  • 0

testa ae..

 

function onSay(cid, words, param)
if param == "" then
  return doPlayerSendTextMessage(cid, 27, "Params missing... "..words.." [player name], [how many])")
end
local t = string.explode(param, ",")
if not t[1] or not t[2] or not tonumber(t[2]) then
  return doPlayerSendTextMessage(cid, 27, "Params missing... "..words.." [player name], [how many])")
end

local player = getPlayerByName(t[1])
local qnt = tonumber(t[2])

if not isCreature(player) then
  return doPlayerSendTextMessage(cid, 27, "Player not found!")
elseif qnt < 1 then
  return doPlayerSendTextMessage(cid, 27, "You need to say a number bigger then 0!")
end

if string.find(words, "health") then
  setCreatureMaxHealth(cid, qnt)
  doCreatureAddHealth(cid, qnt)
  doPlayerSendTextMessage(cid, 27, "Added ".. qnt .." of max health in the player ".. t[1])
else
  setCreatureMaxMana(cid, qnt)
  doPlayerAddMana(cid, qnt)
  doPlayerSendTextMessage(cid, 27, "Added ".. qnt .." of max mana in the player ".. t[1])
end
return true
end

 

 

tag:

<talkaction words="/addhealth" access="5" event="script" value="NOME DO SCRIPT.lua"/>
<talkaction words="/addmana" access="5" event="script" value="NOME DO SCRIPT.lua"/>

 

ali em 'NOME DO SCRIPT' tu coloca o nome q tu der pro script .lua... lembrando q eh um script soh pros 2 comandos...

Editado por Slicer
Link para o comentário
Compartilhar em outros sites

  • 0

Irei Testar Volto Com Respostas :D

 

@edit Ae Lek Funfo Sertinho Mas Tipo, Quando Eu Falo /addhealth Rodrigo, 403990, Ele Adciona Health No Meu Char Nao No Player.

 

Ja Tentei Botar pid, mas nao funfa tbm ...

Link para o comentário
Compartilhar em outros sites

  • 0

erro bobo.. troca isso..

if string.find(words, "health") then
  setCreatureMaxHealth(cid, qnt)
  doCreatureAddHealth(cid, qnt)
  doPlayerSendTextMessage(cid, 27, "Added ".. qnt .." of max health in the player ".. t[1])
else
  setCreatureMaxMana(cid, qnt)
  doPlayerAddMana(cid, qnt)
  doPlayerSendTextMessage(cid, 27, "Added ".. qnt .." of max mana in the player ".. t[1])
end

 

 

por isso..

if string.find(words, "health") then
  setCreatureMaxHealth(player, qnt)
  doCreatureAddHealth(player, qnt)
  doPlayerSendTextMessage(cid, 27, "Added ".. qnt .." of max health in the player ".. t[1])
else
  setCreatureMaxMana(player, qnt)
  doPlayerAddMana(player, qnt)
  doPlayerSendTextMessage(cid, 27, "Added ".. qnt .." of max mana in the player ".. t[1])
end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...