Skip to content

Commit 48b547b

Browse files
committed
fix: secure client events
1 parent 92021e2 commit 48b547b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/events.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ end)
4444

4545
---@param coords vector3
4646
RegisterNetEvent('QBCore:Command:TeleportToPlayer', function(coords)
47+
if GetInvokingResource() then return end
48+
4749
SetPedCoordsKeepVehicle(cache.ped, coords.x, coords.y, coords.z)
4850
end)
4951

@@ -52,6 +54,8 @@ end)
5254
---@param z number
5355
---@param h number
5456
RegisterNetEvent('QBCore:Command:TeleportToCoords', function(x, y, z, h)
57+
if GetInvokingResource() then return end
58+
5559
SetPedCoordsKeepVehicle(cache.ped, x, y, z)
5660
SetEntityHeading(cache.ped, h or GetEntityHeading(cache.ped))
5761
end)

0 commit comments

Comments
 (0)