• 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!

Solved Coins

damiian

New Member
Joined
May 9, 2011
Messages
145
Reaction score
1
Location
cd /Gentoo/
solved

Code:
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` = '" ..getAccountNumberByPlayerName(player:getName()).. "';")
doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE, ""..addpoints.." premium points have been added to your account.")
return true
else
return false
end
end
 
Last edited by a moderator:
Back
Top