bless are not work but you did unlimited bless always when you use !bless command in-game can someone help please?
Code:
local config = {
blessStorage = 12345, -- The storage value you will use to store a players blessings
blessCost = 50000 -- The price of blessings
}
function onSay(cid, words, param)
if(getCreatureStorage(cid, config.blessStorage) <= 0) then
if(doPlayerRemoveMoney(cid, config.blessCost)) then
doCreatureSetStorage(cid, config.blessStorage, 1)
doCreatureSay(cid, "You are now blessed by the Five Gods!", 19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "You need ".. config.blessCost .."gp to buy blessings.")
end
else
doPlayerSendCancel(cid, "You are already blessed.")
end
return true
end
Last edited: