Jump to content

changer problem


Recommended Posts

Here is the script:

local con = exports.mta_connection:getConnection()
local got = false
function ppadd(player, pp)
    if got  == false then
        local pp = tonumber(pp)    
            local oldPP = getElementData(player, "char:pp") 
            local sql = dbExec(con, "UPDATE characters SET premiumpont='".. oldPP .. "' WHERE id='" .. getElementData(player, "char:id") .. "'")
                if (sql) then
                    setElementData(player, "char:pp", oldPP + 1)    
                    outputChatBox( " ...",player,255,255,255,true)
                    got  = true
                    outputChatBox( " ..",player,255,255,255,true)

addCommandHandler("watchpp", ppadd)

Now we can use it only once. It should be used by every player only once on their own account not everbody only once.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...