Slafesko
New Member
- Joined
- Jan 6, 2016
- Messages
- 101
- Reaction score
- 2
Hello OTLanders, for sure it is easy script for old people but a bit hard for new one ;P so this one for them.
Check your HP, Mana by command with exhaustion for 5 seconds if you are using 100%/100% system , HP/Mana (High exp otservs)
talkactions.xml
hp.lua
Check your HP, Mana by command with exhaustion for 5 seconds if you are using 100%/100% system , HP/Mana (High exp otservs)
talkactions.xml
Code:
<talkaction words="!hp" event="script" value="hp.lua"/>
hp.lua
Code:
function onSay(cid, words, param, channel)
local maxhp = getCreatureMaxHealth(cid)
local hp = getCreatureHealth(cid)
local maxmana = getCreatureMaxMana(cid)
local mana = getCreatureMana(cid)
local level = getPlayerLevel(cid)
if exhaustion.check(cid, 7182) == true then
doPlayerSendCancel(cid, "You are exhausted, You should wait for 5 seconds.")
return true
end
if level > 0 then
msg = "Your Health " .. hp .. " / " .. maxhp.. " \n-- Your Mana " .. mana .. " / " .. maxmana .. "."
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, msg)
exhaustion.set(cid, 7182, 5)
return true
end
end
Last edited by a moderator: