• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help with a premium points code

simbabrasil

New Member
Joined
Apr 23, 2023
Messages
31
Reaction score
1
hello guys i need some help with my code, it is not working and the points never go to the opcode shop then ppl cant buy itens in opcode shop, if smn can help me this uis the code:
local hundredPoints = 6554
local fiftyPoints = 6555
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == hundredPoints then
db.query("UPDATE znote_accounts SET points = points + 100 WHERE account_id = ".. player:getAccountId() .."")
elseif item:getId() == fiftyPoints then
db.query("UPDATE znote_accounts SET points = points + 50 WHERE account_id = ".. player:getAccountId() .."")
end

item:getPosition():sendMagicEffect(3)
item:remove()
player:save()
return true
end
 
Back
Top