-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.lua
More file actions
36 lines (31 loc) · 1.14 KB
/
server.lua
File metadata and controls
36 lines (31 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--# Written by koil
--# Web - nopixel.net
--# Twitch - twitch.tv/koil
--# Twitter - twitter.com/itskoil
--# Contact - koiltwitch@gmail.com
--# You can modify, do what you wish with it just dont claim it as your own. (not that its worthy)
-- ###################################
--
-- Credits: DevSun convert to VRPEX
-- Credits: koil creator script
-- My email sun@blackbox.ac
-- my group fivem server https://www.facebook.com/groups/1489038398088259/
-- ###################################
local Tunnel = module("vrp", "lib/Tunnel")
local Proxy = module("vrp", "lib/Proxy")
vRPgf = {}
vRP = Proxy.getInterface("vRP")
vRPclient = Tunnel.getInterface("vRP","vrp_golf")
Tunnel.bindInterface("vrp_golf",vRPgf)
function vRPgf.payGolf()
local source = source
local user_id = vRP.getUserId({source})
local player = vRP.getUserSource({user_id})
if vRP.tryPayment({user_id, 100}) then
TriggerClientEvent('chatMessage', source, "SERVER", {255, 0, 0}, "Você pagou: ^2" .. tostring(100) .. "$.")
return true
else
TriggerClientEvent('chatMessage', source, "SERVER", {255, 0, 0}, "Você não tem dinheiro suficiente.")
return false
end
end