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

How to add premium points to acc, with no using accmaker.

yanger

Banned User
Joined
Aug 28, 2009
Messages
740
Reaction score
7
Location
Stalowa Wola, Poland
Hey, i dont have this option on Accmaker(Addpoints), how can i add points premium manually to some acc? i need it fast, thanks :) repp+
 
talkactions/scripts/addpoints.lua
Lua:
--- Script by Kekox.
function onSay(cid, words, param, channel)
        if(param == '') then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
                return true
        end

        local t = string.explode(param, ",")
        t[1] = tonumber(t[1])
        if(not t[1]) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
                return true
        end

        local pid = cid
        if(t[2]) then
                pid = getPlayerByNameWildcard(t[2])
                if(not pid) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
                        return true
                end
        end

       sender = getPlayerByNameWildcard(cid)
       
       doAddPremiumPoints(pid, t[1])
       doPlayerSendTextMessage(cid, "You have added ".. t[1] .." premium points to ".. t[2])
       doPlayerSendTextMessage(pid, sender .." just gave you ".. t[1] .." premium points.")    
        return true
end

Talkactions.xml
Code:
<talkaction log="yes" words="/addpoints" access="5" event="script" value="addpoints.lua"/>

lib/functions.lua add this lines:
Lua:
function doAddPremiumPoints(cid, points)
    db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
end

It work like a command.. /addpoints 50, Kekox.
 
@cek~

don't get it :/

2djch7k.jpg
 
Heh, i was trying something like this before, but it was:

UPDATE accounts SET premium_points = premium_points +10 WHERE name = 'xx'

And i think it wasn't working. Thanks Cyko~:)
again repp+ for u
 
Back
Top