I have this script but I want to put when one player say !stamina need stay without pz for buying.
Help please.
Help please.
Code:
function onSay(cid, words, param, channel)
local cfg = {}
cfg.refuel = 42 * 60 * 1000
cfg.time = 4 * 60 * 1000
cfg.price = 1000000
if(words == "!stamina") then
if(getPlayerStamina(cid) >= cfg.refuel) then
doPlayerSendCancel(cid, "Tu stamina esta full.")
elseif(getPlayerMoney(cid) < cfg.price) then
doPlayerSendCancel(cid, "Tu no tienes dinero, para recargarla vale 1kk.")
else
doPlayerSetStamina(cid, cfg.refuel)
doPlayerRemoveMoney(cid, cfg.price)
doCreatureSay(cid, "Tu stamina fue recuperada!", TALKTYPE_ORANGE_1)
end
return true
end
end