Untitled - MARKUP 0.80 KB
                                
                                    if(task.premiumpoints ~= nil) then
            guid = getPlayerGUID(cid)
            local result_plr2 = db.getResult("SELECT account, premiumpoints FROM players WHERE id = "..guid..";")
            local id2 = -1
            local points = 0
            if(result_plr2  ~= -1) then
                id2 = tonumber(result_plr.getNumber(result_plr2, "account_id"))
                points = tonumber(result_plr.getNumber(result_plr2, "premiumpoints"))
                result_plr.free(result_plr2)
            end
            if(id2 != -1) then
                points = points + task.premiumpoints
                db.executeQuery("UPDATE accounts SET premiumpoints = points WHERE id = " .. id2 .. ";")
            end 
        end
                                
                            

Paste Hosted With By Wklejamy.pl