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(es_extended/client/modules/action): add TrackJumping on SlowLoop… #1616

Closed
wants to merge 8 commits into from
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: Bug report
about: Create a report to help us improve
title: "[Bug] - esx_script - Issue"
labels: bug
assignees:
- TheFantomas
- Gellipapa
assignees: Arctos2win, Kenshiin13

---

Expand Down
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: Feature Request
about: Help us improve esx with your ideas
title: "[Feature Request] - esx_script - Add better configuration"
labels: enhancement
assignees:
- TheFantomas
- Gellipapa
assignees: Arctos2win, Kenshiin13

---

Expand Down
2 changes: 1 addition & 1 deletion [core]/cron/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ game 'gta5'
author 'ESX-Framework'
description 'Allows resources to Run tasks at specific intervals.'
lua54 'yes'
version '1.12.3'
version '1.12.4'

server_script 'server/main.lua'
21 changes: 21 additions & 0 deletions [core]/es_extended/client/modules/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,34 @@ function Actions:TrackWeapon()
end
end

function Actions:TrackJumping()
local isJumping = IsPedJumping(ESX.PlayerData.ped)

if isJumping and not self.isJumping then
self.isJumping = true
TriggerEvent("esx:playerJumping")
TriggerServerEvent("esx:playerJumping")

if Config.EnableDebug then
print("[DEBUG] Player started jumping")
end
elseif not isJumping and self.isJumping then
self.isJumping = false

if Config.EnableDebug then
print("[DEBUG] Player stopped jumping")
end
end
end

function Actions:SlowLoop()
CreateThread(function()
while ESX.PlayerLoaded do
self:TrackPedCoords()
self:TrackPauseMenu()
self:TrackVehicle()
self:TrackWeapon()
self:TrackJumping()
Wait(500)
end
end)
Expand Down
2 changes: 2 additions & 0 deletions [core]/es_extended/client/modules/death.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ end

AddEventHandler("esx:onPlayerSpawn", function()
Citizen.CreateThreadNow(function()
while not ESX.PlayerLoaded do Wait(0) end

while ESX.PlayerLoaded and not ESX.PlayerData.dead do
if DoesEntityExist(ESX.PlayerData.ped) and (IsPedDeadOrDying(ESX.PlayerData.ped, true) or IsPedFatallyInjured(ESX.PlayerData.ped)) then
Death:Died()
Expand Down
2 changes: 1 addition & 1 deletion [core]/es_extended/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fx_version 'cerulean'
game 'gta5'
description 'The Core resource that provides the functionalities for all other resources.'
lua54 'yes'
version '1.12.3'
version '1.12.4'

shared_scripts {
'locale.lua',
Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_chat_theme/fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version '1.12.3'
version '1.12.4'
author 'ESX-Framework'
description 'A ESX Stylised theme for the chat resource.'

Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_context/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ game 'gta5'
author 'ESX-Framework & Brayden'
description 'A simplistic context menu for ESX.'
lua54 'yes'
version '1.12.3'
version '1.12.4'

ui_page 'index.html'

Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_identity/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
description 'Allows the player to Pick their characters: Name, Gender, Height and Date-of-birth.'
lua54 'yes'
version '1.12.3'
version '1.12.4'

shared_scripts {
'@es_extended/imports.lua',
Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_loadingscreen/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ game 'common'
fx_version 'cerulean'
author 'ESX-Framework'
description 'Allows resources to Run tasks at specific intervals.'
version '1.12.3'
version '1.12.4'
lua54 'yes'

loadscreen 'index.html'
Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_menu_default/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
description 'A basic menu system for ESX Legacy.'
lua54 'yes'
version '1.12.3'
version '1.12.4'

client_scripts { '@es_extended/imports.lua', 'client/main.lua' }

Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_menu_dialog/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
description 'A basic input dialog for ESX Legacy.'
lua54 'yes'
version '1.12.3'
version '1.12.4'

client_scripts {
'@es_extended/imports.lua',
Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_menu_list/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
description 'A basic table-based menu system for ESX Legacy.'
lua54 'yes'
version '1.12.3'
version '1.12.4'


client_scripts {
Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_multicharacter/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fx_version 'cerulean'
game 'gta5'
author 'ESX-Framework - Linden - KASH'
description 'Allows players to have multiple characters on the same account.'
version '1.12.3'
version '1.12.4'
lua54 'yes'

dependencies { 'es_extended', 'esx_context', 'esx_identity', 'esx_skin' }
Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_notify/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fx_version 'adamant'

lua54 'yes'
game 'gta5'
version '1.12.3'
version '1.12.4'
author 'ESX-Framework'
description 'A beautiful and simple NUI notification system for ESX'

Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_progressbar/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
author 'ESX-Framework'
description 'A beautiful and simple NUI progress bar for ESX'
version '1.12.3'
version '1.12.4'
lua54 'yes'

client_scripts { 'Progress.lua' }
Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_skin/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fx_version 'adamant'

game 'gta5'
description 'Allows players to customise their character\'s appearance'
version '1.12.3'
version '1.12.4'
lua54 'yes'

shared_scripts {
Expand Down
2 changes: 1 addition & 1 deletion [core]/esx_textui/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fx_version 'adamant'
game 'gta5'
author 'ESX-Framework'
description 'A beautiful and simple Persistent Notification system for ESX.'
version '1.12.3'
version '1.12.4'
lua54 'yes'

client_scripts { 'TextUI.lua' }
Expand Down
2 changes: 1 addition & 1 deletion [core]/skinchanger/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fx_version 'adamant'

game 'gta5'
description 'Saves/loads character appearances for ESX Legacy.'
version '1.12.3'
version '1.12.4'
lua54 'yes'

client_scripts {
Expand Down