Skip to content

Instantly share code, notes, and snippets.

@d0p3t
Created June 10, 2017 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d0p3t/23d5379ea5c1f48e3f445f79417d29d1 to your computer and use it in GitHub Desktop.
Save d0p3t/23d5379ea5c1f48e3f445f79417d29d1 to your computer and use it in GitHub Desktop.
RegisterServerEvent('vRP:payment')
RegisterServerEvent('vRP:salary')
AddEventHandler('vRP:payment',function(player, amount)
local user_id = vRP.getUserId(player)
if user_id ~= nil then
vRP.giveMoney(user_id, amount)
end
end)
AddEventHandler('vRP:salary', function(player)
local salary = 50
local user_id = vRP.getUserId(player)
if user_id ~= nil then
vRP.giveMoney(user_id, salary)
vRPclient.notify(player,{"Welfare received : + 50~g~$"})
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment