function onSay(cid, words, param, channel)
local cfg = {
full = 200,
price = 10000
}
if(getPlayerSoul(cid) >= cfg.full) then
doPlayerSendCancel(cid, "Your soul points are full already.")
elseif(no isPremium(cid)) then
doPlayerSendCancel(cid, "You must have premium account.")
elseif(getPlayerMoney(cid) < cfg.price) then
doPlayerSendCancel(cid, "You do not have enough money.")
else
doPlayerRemoveMoney(cid, cfg.price)
doPlayerAddSoul(cid, cfg.full - getPlayerSoul(cid))
doCreatureSay(cid, "Your soul points have been refilled!", TALKTYPE_ORANGE_1)
end
return true
end
local cfg = {
full = 200,
price = 10000
}
function onSay(cid, words, param, channel)
local c = getPlayerSoul(cid) >= cfg.full and 1 or isPremium(cid) == FALSE and 2 or doPlayerRemoveMoney(cid, cfg.price) == FALSE and 3 or nil
return TRUE, c and doPlayerSendCancel(cid, c == 1 and "Your soul points are full already." or c == 2 and "You must have premium account." or c == 3 and "You do not have enough money.") or doPlayerAddSoul(cid, cfg.full - getPlayerSoul(cid)) and doCreatureSay(cid, "Your soul points have been refilled!", TALKTYPE_ORANGE_1)
end
It works just fine...![]()