solved
local addpoints = 10 -- amount of points to add
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if isPlayer(player) and doRemoveItem(item.uid, 1) then
db.query("UPDATE `accounts` SET `points` = `points` + "..addpoints.." WHERE `id` = '"...