-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathserver.lua
More file actions
32 lines (23 loc) · 1.03 KB
/
Copy pathserver.lua
File metadata and controls
32 lines (23 loc) · 1.03 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
RegisterServerEvent("SafeZones:isAllowed")
AddEventHandler("SafeZones:isAllowed", function()
if IsPlayerAceAllowed(source, "safezones.bypass") then
TriggerClientEvent("SafeZones.returnIsAllowed", source, true)
else
TriggerClientEvent("SafeZones.returnIsAllowed", source, false)
end
end)
versionChecker = true -- Set to false to disable version checker
-- Don't touch
resourcename = "SafeZones"
version = "1.0.4"
rawVersionLink = "https://raw.githubusercontent.com/Swqppingg/SafeZones/main/version.txt"
-- Check for version updates.
if versionChecker then
PerformHttpRequest(rawVersionLink, function(errorCode, result, headers)
if (string.find(tostring(result), version) == nil) then
print("\n\r[".. GetCurrentResourceName() .."] ^1WARNING: Your version of ".. resourcename .." is not up to date. Please make sure to update whenever possible.\n\r")
else
print("\n\r[".. GetCurrentResourceName() .."] ^2You are running the latest version of ".. resourcename ..".\n\r")
end
end, "GET", "", "")
end