Skip to content

Commit 2e99f92

Browse files
authored
Update gps.lua
1 parent fde659d commit 2e99f92

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

[gameplay]/gps/gps.lua

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
local floor = math.floor
22

3-
local allowedRPC = {
4-
calculatePathByCoords = true,
5-
calculatePathByNodeIDs = true,
6-
spawnPlayer = true
7-
}
8-
93
local function getAreaID(x, y)
104
return floor((y + 3000)/750)*8 + floor((x + 3000)/750)
115
end
@@ -113,21 +107,3 @@ function calculatePathByNodeIDs(node1, node2)
113107
return false
114108
end
115109
end
116-
117-
addEvent('onServerCall', true)
118-
addEventHandler('onServerCall', root,
119-
function(fnName, ...)
120-
if allowedRPC[fnName] then
121-
_G[fnName](...)
122-
end
123-
end
124-
)
125-
126-
addEvent('onServerCallback', true)
127-
addEventHandler('onServerCallback', root,
128-
function(crID, fnName, ...)
129-
if allowedRPC[fnName] then
130-
triggerClientEvent(source, 'onServerCallbackReply', resourceRoot, crID, _G[fnName](...))
131-
end
132-
end
133-
)

0 commit comments

Comments
 (0)