Skip to content

Commit 47cf3ac

Browse files
authored
Merge pull request #1169 from Borreke0/main
TP with heading support
2 parents e58759a + e90fa91 commit 47cf3ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/commands.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ QBCore.Commands.Add('tp', Lang:t('command.tp.help'), { { name = Lang:t('command.
104104
local x = tonumber((args[1]:gsub(',', ''))) + .0
105105
local y = tonumber((args[2]:gsub(',', ''))) + .0
106106
local z = tonumber((args[3]:gsub(',', ''))) + .0
107+
local heading = args[4] and tonumber((args[4]:gsub(',', ''))) + .0 or false
107108
if x ~= 0 and y ~= 0 and z ~= 0 then
108-
TriggerClientEvent('QBCore:Command:TeleportToCoords', source, x, y, z)
109+
TriggerClientEvent('QBCore:Command:TeleportToCoords', source, x, y, z, heading)
109110
else
110111
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.wrong_format'), 'error')
111112
end

0 commit comments

Comments
 (0)