MA
pedido

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

Por Maenilse, 20 de jan. de 2013 em Scripts

script
10
1.2k
MaenilseM
20 de janeiro de 2013 às 14:19

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

SlicerS
20 de janeiro de 2013 às 14:53

healar 500 mp/hp ou aumentar a maxHealth/maxMana do player?

MaenilseM
20 de janeiro de 2013 às 15:13

@UP, Eu Quero Que Almente a Maxhealth e Maxmana Do Player, Com a Quantidade Que Eu Quero.

SlicerS
20 de janeiro de 2013 às 16:02

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 Janeiro 20 por Slicer

MaenilseM
20 de janeiro de 2013 às 20:55

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

SlicerS
20 de janeiro de 2013 às 21:29

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

MaenilseM
21 de janeiro de 2013 às 08:45

@UP Rep+ Pra Voce Lek, Gostei Mt Do Script.

 

@Topic Podem Fexar.

SlicerS
21 de janeiro de 2013 às 10:38

sanado, movido

MaenilseM
21 de janeiro de 2013 às 12:08

Sanado, Podem Excluir ou Fexar o Topico Vlws.

LostzeraL
22 de janeiro de 2013 às 21:29

ja tinha comando que fazia isso kk