DanJ93
ElfBot Helper
- Joined
- Jan 18, 2009
- Messages
- 2,631
- Reaction score
- 198
Komenda: !hp na ilo??
talkactions.xml
[lua]<talkaction words="!hp;!mp" event="script" value="procentowo.lua"/>[/lua]
procentowo.lua
[lua]function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid, 2800) <= os.time() then
local kk = os.time()+5
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HP: " .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. " MP: " .. getPlayerMana(cid) .. " / " .. getPlayerMaxMana(cid) .. "")
setPlayerStorageValue(cid, 2800, kk)
else
doPlayerSendCancel(cid, "You are exhausted.")
end
return true
end[/lua]
##################################
Je?li mamy source do swojego silnika HP i MANA w procentach
Komenda: !hp na procenty (tak w razie jak kto? nie ma source)
talkactions.xml
[lua]<talkaction words="!hp;!mp" event="script" value="procentowo.lua"/>[/lua]
procentowo.lua
[lua]function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid, 2800) <= os.time() then
local hpp = (getCreatureHealth(cid) * 100 / getCreatureMaxHealth(cid))
local mpp = (getPlayerMana(cid) * 100 / getPlayerMaxMana(cid))
local kk = os.time()+5
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HP: " .. hpp .. "% and " .. mpp .. "%")
setPlayerStorageValue(cid, 2800, kk)
else
doPlayerSendCancel(cid, "You are exhausted.")
end
return true
end[/lua]
talkactions.xml
[lua]<talkaction words="!hp;!mp" event="script" value="procentowo.lua"/>[/lua]
procentowo.lua
[lua]function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid, 2800) <= os.time() then
local kk = os.time()+5
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HP: " .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. " MP: " .. getPlayerMana(cid) .. " / " .. getPlayerMaxMana(cid) .. "")
setPlayerStorageValue(cid, 2800, kk)
else
doPlayerSendCancel(cid, "You are exhausted.")
end
return true
end[/lua]
##################################
Je?li mamy source do swojego silnika HP i MANA w procentach
Komenda: !hp na procenty (tak w razie jak kto? nie ma source)
talkactions.xml
[lua]<talkaction words="!hp;!mp" event="script" value="procentowo.lua"/>[/lua]
procentowo.lua
[lua]function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid, 2800) <= os.time() then
local hpp = (getCreatureHealth(cid) * 100 / getCreatureMaxHealth(cid))
local mpp = (getPlayerMana(cid) * 100 / getPlayerMaxMana(cid))
local kk = os.time()+5
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HP: " .. hpp .. "% and " .. mpp .. "%")
setPlayerStorageValue(cid, 2800, kk)
else
doPlayerSendCancel(cid, "You are exhausted.")
end
return true
end[/lua]