Jump to content

Alguem me ajuda nisso


Recommended Posts

unction give1()
    if getPlayerMoney(source) >= 34 then
    setElementData (source, "1", (getElementData(source, "1") or 0) + 1)
    triggerClientEvent (source, "addBox", source, "Você está comprou (+1)!", "success")
    else
        triggerClientEvent (source, "addBox", source, "Você está sem dinheiro!", "error")
    end
end
addEvent("give1",true)
addEventHandler("give1", root, give1)
 
tá esse código no menu de compra, mas quando compra a comida ou o objeto, não gasta dinheiro somente compra, como eu poderia fazer para quando eu clicasse lá no preço o dinheiro fosse cobrado
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...