-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.lua
More file actions
33 lines (30 loc) · 818 Bytes
/
server.lua
File metadata and controls
33 lines (30 loc) · 818 Bytes
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
local Tunnel = module("vrp", "lib/Tunnel")
local Proxy = module("vrp", "lib/Proxy")
vRP = Proxy.getInterface("vRP")
vRPclient = Tunnel.getInterface("vRP")
vRPnitro = {}
Tunnel.bindInterface("vrp_nitro",vRPnitro)
function vRPnitro.chamada()
local user_id = vRP.getUserId(source)
local player = vRP.getUserSource(user_id)
if vRP.tryGetInventoryItem(user_id,"nitro",1,false) then
TriggerClientEvent("pNotify:SendNotification", player, {
text = "Nitro Ativado",
type = "success",
progressBar = true,
queue = "lmao",
timeout = 2000,
layout = "CenterLeft"
})
return true
end
TriggerClientEvent("pNotify:SendNotification", player, {
text = "Você Não tem Nitro",
type = "error",
progressBar = true,
queue = "lmao",
timeout = 2000,
layout = "CenterLeft"
})
return false
end