Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(menu): add keymapping for tp to waypoint #886

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions resource/menu/client/cl_base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ RegisterNetEvent('txcl:setAdmin', function(username, perms, rejectReason)
RegisterKeyMapping('txAdmin:menu:openPlayersPage', 'Menu: Open Players page', 'KEYBOARD', '')
RegisterKeyMapping('txAdmin:menu:noClipToggle', 'Menu: Toggle NoClip', 'keyboard', '')
RegisterKeyMapping('txAdmin:menu:togglePlayerIDs', 'Menu: Toggle Player IDs', 'KEYBOARD', '')
RegisterKeyMapping('txAdmin:menu:tpToWaypoint', 'Menu: Teleport to waypoint', 'KEYBOARD', '')
else
noMenuReason = tostring(rejectReason)
debugPrint("^3[AUTH] rejected (" .. noMenuReason .. ")")
Expand Down
5 changes: 5 additions & 0 deletions resource/menu/client/cl_main_page.lua
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,8 @@ RegisterNetEvent('txcl:clearArea', function(radius)
-- after found nativedb info. Maybe needs research lmao?
ClearAreaLeaveVehicleHealth(curCoords.x, curCoords.y, curCoords.z, radiusToFloat, false, false, false, false, false)
end)

-- Teleport to the current waypoint via command for key mapping
RegisterCommand('txAdmin:menu:tpToWaypoint', function()
tabarra marked this conversation as resolved.
Show resolved Hide resolved
TriggerServerEvent('txsv:req:tpToWaypoint')
end)