• 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][TALKACTION] Add premium points to an account

Legnak Bqm

New Member
Joined
Mar 25, 2010
Messages
120
Reaction score
1
Location
Venezuela
Hi guys i need a command to add and remove premium points to an account, something like this: /addpoints 123456, 50 or /removepoints 123456, 50

I would appreciate any help
Regards ^^,
 
Last edited:
Mmm

test-->

function onSay(cid, words, param)
local t = string.explode(param, ",")
if t[1] ~= nil and t[2] ~= nil then
local result = db.getResult("SELECT `account_id` FROM `players` WHERE `name` = '"..t[1].."';")
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + "..t[2].." WHERE `id` = '" ..result:getDataString("account_id").. "';")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, ""..t[1].." has received "..t[2].." premium points.")
result:free()
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command Requires Two Params.")
end
return TRUE
end
 
Back
Top