Jabra
Banned User
- Joined
- Jan 11, 2014
- Messages
- 19
- Reaction score
- 0
I try useing this
But something is wrong with
Lua Script Error: [Action Interface]
data/actions/scripts/other/staminadoll.luanUse
data/actions/scripts/other/staminadoll.lua:4: attempt to call global 'getPlayerStamina' (a nil value)
Does tfs 1.0 has other function that work?
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cfg = {}
cfg.refuel = 42 * 60 * 1000
if(getPlayerStamina(cid) >= cfg.refuel) then
doPlayerSendCancel(cid, "Your stamina is already full.")
elseif(not isPremium(cid)) then
doPlayerSendCancel(cid, "You must have a premium account.")
else
doPlayerSetStamina(cid, cfg.refuel)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
doRemoveItem(item.uid)
end
return true
end
But something is wrong with
Lua Script Error: [Action Interface]
data/actions/scripts/other/staminadoll.luanUse
data/actions/scripts/other/staminadoll.lua:4: attempt to call global 'getPlayerStamina' (a nil value)
Does tfs 1.0 has other function that work?