Hello,and give one error in console
that can cause the problem?im using tfs 0.3.4
thz
PHP:
[28/05/2009 22:01:20] data/movements/scripts/pisodanonordeste1.lua:15: attempt to call global 'getPlayerHealth' (a nil value)
[28/05/2009 22:01:20] stack traceback:
[28/05/2009 22:01:20] data/movements/scripts/pisodanonordeste1.lua:15: in function <data/movements/scripts/pisodanonordeste1.lua:1>
HTML:
function onStepIn(cid, item, pos)
---Action by Jovial---
--Config--
voc = 8 --0 = no vocation, 5 = sorcerer, 6 = druida, 7 = paladin, 8 = knight--
voc2 = 5
voc3 = 7
dano = 300 --quanto ira tirar de vida
cor = 180 --cor da letra do hit 5=azul, 180=red, etc
efeito = 3 --numero do efeito desejado
--End Config--
hp = getPlayerHealth(cid)
topos = getPlayerPosition(cid)
pvoc = getPlayerVocation(cid)
pvoc3 = getPlayerVocation(cid)
pvoc2 = getPlayerVocation(cid)
if voc == pvoc or voc2 == pvoc or voc3 == pvoc then
if getPlayerHealth(cid) >= dano then
doCreatureAddHealth(cid, -dano)
doSendAnimatedText(topos, dano, cor)
doSendMagicEffect(topos, efeito)
else
doCreatureAddHealth(cid, -hp)
doSendAnimatedText(topos, hp, cor)
doSendMagicEffect(topos, efeito)
end
end
return 1
end
that can cause the problem?im using tfs 0.3.4
thz