Jump to content

Mudar dinheiro


Recommended Posts

Então eu estou tentando mudar o  método de dinheiro dessa loja de tuning para o método  que uso mas não estou conseguindo, alguem consegue me ajudar?

Meu  sistema de  money

exports.dinheiro:tDinheiro(Player, Quantidade)  --- Para ver se o player tem dinheiro

exports.dinheiro:pDinheiro(Player, Quantidade)  --- Para pegar o dinheiro do player

Parte do codigo que eu acho que deveria mudar, mas quando mudo não funciona

function hasPlayerMoney(money)
	if getPlayerMoney(localPlayer) >= money then
		return true
	end
	
	return false
end
function moneyChange(amount)
	takePlayerMoney(loopTable[hoveredCategory]["tuningPrice"])
	giveNotification("success", getLocalizedText("notification.success.purchased"))
	playSoundEffect("moneychange.wav")
	
	if amount > 0 then
		moneyChangeTable = {
			["tick"] = getTickCount() + 5000,
			["amount"] = amount
		}
	end
end

 

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