[HELP] Money MySql Script

help

#1

Hello,
how can i make money in my sql with a script?

example:
Player kills a player and gets $ 100

sry for my Eng.


#2

Well what are you using? essentialmode? vRP? ESX? Or something else? Each of them have their own commands for adding money to a players account.


#3

Ahhh ok, i have essentialmode and fs_freemode


#4
RegisterServerEvent('giveBank')
AddEventHandler('giveBank', function(amount)
	local source = source
	TriggerEvent('es:getPlayerFromId', source, function(user)
		user.addBank(tonumber(amount))
	end)
end)

Replace Bank by Money if you want to give him cash.


#5

yes it works ! thank you :star_struck: