Jump to content

help


DonOmar

Recommended Posts

Lol using 3 server names inside the same code :fp:, and you said that it's your code.

function convert(player, cmd, ammo) 
    if player and isElement(player) then  
        local vip = getElementData(player, "CIFvip") or 0 
        if tonumber(ammo) then  
            if (vip > 0) then 
                if tonumber(ammo) < vip then  
                    local cash = math.ceil(tonumber(ammo)*10000 ) 
                    exports.CIFvip:removePlayerDonator(getAccountName(getPlayerAccount(player)),ammo) 
                    exports.CRPaccounts:GPM(player, cash, "converted "..ammo.." VIP Hours for "..cash) 
                    outputChatBox("You have successfully converted "..exports.CORmisc:formatNumber(ammo).." VIP hours to "..exports.CORmisc:formatNumber(cash).."", player, 0, 255, 0) 
                else 
                    outputChatBox("You don't have VIP hours to convert!", player, 255, 0, 0) 
                end 
            end 
        end  
    end  
end 
addCommandHandler("convertviptomoney", convert) 

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...