Awesomedudei
Revolutionot.com
I have an item with this Code on my server
People who have 0 points and use this item doesn't gain any points
but if you already have more than 1 point it gets added
Why is this ?:/
Code:
local points = 15
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
db.query("UPDATE `znote_accounts` SET `points` = `points` + '15' WHERE `id` = '" .. player:getAccountId() .. "';")
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received 15 store credit.")
item:remove(1)
return true
end
People who have 0 points and use this item doesn't gain any points
but if you already have more than 1 point it gets added
Why is this ?:/