Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cfg = {
- points = 20, -- Points necessarios
- gain = 15410, -- Item ID gained
- amount = 1, -- Quantidade
- }
- function onUse(cid, item, frompos, item2, topos)
- local points = getAccountPoints(cid)
- if points >= cfg.points then
- doPlayerAddItem(cid, cfg.gain, cfg.amount)
- doSendAnimatedText(getCreaturePosition(cid), "DONATE!", math.random(1, 255))
- db.executeQuery("UPDATE `accounts` SET `premium_points` = '".. points - cfg.points .."' WHERE `name` ='".. getPlayerAccount(cid) .."'")
- else
- doPlayerSendTextMessage(cid, 20, "Você não tem points o suficiente, você tem "..getAccountPoints(cid).." points")
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment