Jump to content

alguem em ajuda n sei como coloco o script ele e mysql e so da pra comprar items do inventario com o char.money mais queria comprar com dinheiro normal do jogo me ajudem pfv


Recommended Posts

 

function buyItem(player, item, value, amount, count, db)
    if (getElementData(player, "char.money")>=amount) then
        exports.vz_inventario:giveItem(player, item, value, db, 0)
        setElementData(player, "char.money", getElementData(player, "char.money") - amount)
        exports["vz_info"]:showBoxS(player,"Compra efetuada com sucesso","info")
    else
        exports["vz_info"]:showBoxS(player,"Dinheiro insuficiente","error")
    end
end

 

Link to post
  • Administrators

Hello, welcome to the forums @XernobyL

Your thread's been moved into the Portuguese forum. The Site/Forum/Discord/Mantis/Wiki related is within the international part of the forums where posts should be English.

Link to post

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