Matheus Vieira
Member
- Joined
- Apr 11, 2015
- Messages
- 98
- Reaction score
- 5
Good evening everyone.
I really want a script where when a player looks at a monster, it will show its current life and total, something like this:
You see a Dragon. Health [850/1000]
I already have a script that shows other player's health, and it goes like this, you can use this as a basis(?)(not my native language) if it will help you.
Thank you very much.
I really want a script where when a player looks at a monster, it will show its current life and total, something like this:
You see a Dragon. Health [850/1000]
I already have a script that shows other player's health, and it goes like this, you can use this as a basis(?)(not my native language) if it will help you.
Lua:
function onLook(cid, thing, position, lookDistance)
if thing.uid ~= cid and isPlayer(thing.uid) then
string = '\nPlayer information ('..getCreatureName(thing.uid)..')\nHealth: ['..getCreatureHealth(thing.uid)..'/'..getCreatureMaxHealth(thing.uid)..']\nMana: ['..getCreatureMana(thing.uid)..'/'..getCreatureMaxMana(thing.uid)..']'
doPlayerSendTextMessage(cid, 22, string)
elseif thing.uid == cid then
string = '\nYour information ('..getCreatureName(cid)..')\nHealth: ['..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..']\nMana: ['..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..']'
doPlayerSendTextMessage(cid, 22, string)
end
return true
end
Thank you very much.