Skip to content

Commit

Permalink
Merge pull request #2 from Arctos2win/dev
Browse files Browse the repository at this point in the history
dev to loadESXPlayer
  • Loading branch information
Arctos2win authored Jan 24, 2024
2 parents 55ec231 + e765491 commit ae4473b
Show file tree
Hide file tree
Showing 10 changed files with 356 additions and 335 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/auto-move-project-card.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Add issue or pull request to project board

on:
issues:
types:
- opened
pull_request_target:
types:
- opened

jobs:
auto-move-project-cards:
uses: esx-framework/.github/.github/workflows/automatic-add-issue-to-board.yml@main
secrets: inherit
34 changes: 0 additions & 34 deletions .github/workflows/main.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/simple-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Simple Release

on:
workflow_dispatch:
inputs:
versionNumber:
description: 'Version Number'
required: false
default: ''
zipName:
description: 'Zip Name'
required: true
default: 'esx_core'
web:
description: 'Web'
required: false
default: 'false'
excludeOptions:
type: string
description: Separate the files or folders that you do not want to see in the release with a comma.
required: false

jobs:
simple-create-release:
uses: esx-framework/.github/.github/workflows/simple-release.yml@main
with:
zipName: ${{ github.event.inputs.zipName }}
web: ${{ github.event.inputs.web }}
versionNumber: ${{ github.event.inputs.versionNumber }}
excludeOptions: ${{ github.event.inputs.excludeOptions }}
1 change: 1 addition & 0 deletions [SQL]/legacy.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ CREATE TABLE IF NOT EXISTS `banking` (
`time` bigint(20) DEFAULT NULL,
`ID` int(11) NOT NULL AUTO_INCREMENT,
`balance` int(11) DEFAULT 0,
`label` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

Expand Down
4 changes: 1 addition & 3 deletions [core]/es_extended/client/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ exports('getSharedObject', function()
return ESX
end)

if GetResourceState('ox_inventory') ~= 'missing' then
Config.OxInventory = true
end
Config.OxInventory = GetResourceState('ox_inventory'):find('start') and true

AddEventHandler("esx:getSharedObject", function()
local Invoke = GetInvokingResource()
Expand Down
507 changes: 255 additions & 252 deletions [core]/es_extended/locales/he.lua

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions [core]/es_extended/server/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Core.playersByIdentifier = {}

Core.vehicleTypesByModel = {}


RegisterNetEvent('esx:onPlayerSpawn', function()
ESX.Players[source].spawned = true
end)

AddEventHandler("esx:getSharedObject", function()
local Invoke = GetInvokingResource()
print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke))
Expand All @@ -23,11 +28,11 @@ exports('getSharedObject', function()
return ESX
end)

if GetResourceState('ox_inventory') ~= 'missing' then
Config.OxInventory = true
Config.PlayerFunctionOverride = 'OxInventory'
SetConvarReplicated('inventory:framework', 'esx')
SetConvarReplicated('inventory:weight', Config.MaxWeight * 1000)
if GetResourceState('ox_inventory'):find('start') then
Config.OxInventory = true
Config.PlayerFunctionOverride = 'OxInventory'
SetConvarReplicated('inventory:framework', 'esx')
SetConvarReplicated('inventory:weight', Config.MaxWeight * 1000)
end

local function StartDBSync()
Expand Down
4 changes: 4 additions & 0 deletions [core]/es_extended/server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ local function updateHealthAndArmorInMetadata(xPlayer)
end

function Core.SavePlayer(xPlayer, cb)
if not xPlayer.spawned then
return cb and cb()
end

updateHealthAndArmorInMetadata(xPlayer)
local parameters <const> = {
json.encode(xPlayer.getAccounts(true)),
Expand Down
74 changes: 37 additions & 37 deletions [core]/esx_identity/locales/sl.lua
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
Locales['sl'] = {
['show_active_character'] = 'Prikaži aktivnega lika',
['active_character'] = 'Aktivni lik: %s',
['error_active_character'] = 'Prišlo je do napake pri pridobivanju podatkov.',
['delete_character'] = 'Izbriši trenutnega lika.',
['deleted_character'] = 'Lik je bil izbrisan',
['error_delete_character'] = 'Prišlo je do težave pri brisanju lika.',
['thank_you_for_registering'] = 'Registracija uspešna. Uživajte!',
['debug_xPlayer_get_first_name'] = 'Vrne vaše ime',
['debug_xPlayer_get_last_name'] = 'Vrne vaše priimek',
['debug_xPlayer_get_full_name'] = 'Vrne vaše polno ime',
['debug_xPlayer_get_sex'] = 'Vrne vaš spol',
['debug_xPlayer_get_dob'] = 'Vrne vaš datum rojstva',
['debug_xPlayer_get_height'] = 'Vrne vašo višino',
['error_debug_xPlayer_get_first_name'] = 'Prišlo je do težave pri pridobivanju vašega imena.',
['error_debug_xPlayer_get_last_name'] = 'Prišlo je do težave pri pridobivanju vašega priimka.',
['error_debug_xPlayer_get_full_name'] = 'Prišlo je do težave pri pridobivanju vašega polnega imena.',
['error_debug_xPlayer_get_sex'] = 'Prišlo je do težave pri pridobivanju vašega spola.',
['error_debug_xPlayer_get_dob'] = 'Prišlo je do težave pri pridobivanju vašega datuma rojstva.',
['error_debug_xPlayer_get_height'] = 'Prišlo je do težave pri pridobivanju vaše višine.',
['return_debug_xPlayer_get_first_name'] = 'Ime: %s',
['return_debug_xPlayer_get_last_name'] = 'Priimek: %s',
['return_debug_xPlayer_get_full_name'] = 'Ime: %s',
['return_debug_xPlayer_get_sex'] = 'Spol: %s',
['return_debug_xPlayer_get_dob'] = 'Datum rojstva: %s',
['return_debug_xPlayer_get_height'] = 'Višina: %s palcev',
['data_incorrect'] = 'Neveljavni podatki. Poskusite znova.',
['invalid_format'] = 'Neveljavna oblika podatkov. Poskusite znova.',
['no_identifier'] = '[ESX Identity]\nPrišlo je do težave pri nalaganju vašega lika!\nNapaka: manjkajoč-identifier\n\nTo je posledica manjkajočega identifikatorja. Prosimo, poskusite znova kasneje ali to težavo prijavite lastniku strežnika.',
['missing_identity'] = '[ESX Identity]\nPrišlo je do težave pri nalaganju vašega lika!\nNapaka: manjkajoč-identity\n\nZdi se, da manjka vaša identiteta. Poskusite znova.',
['deleted_identity'] = 'Lik izbrisan. Prosimo, ponovno se pridružite in ustvarite nov lik.',
['already_registered'] = 'Že ste registrirani.',
['invalid_firstname_format'] = 'Neveljavna oblika (Ime). Poskusite znova.',
['invalid_lastname_format'] = 'Neveljavna oblika (Priimek). Poskusite znova.',
['invalid_dob_format'] = 'Neveljavna oblika (Datum rojstva). Poskusite znova.',
['invalid_sex_format'] = 'Neveljavna oblika (Spol). Poskusite znova.',
['invalid_height_format'] = 'Neveljavna oblika (Višina). Poskusite znova.'
}
['show_active_character'] = 'Prikaži aktivnega lika',
['active_character'] = 'Aktivni lik: %s',
['error_active_character'] = 'Prišlo je do napake pri pridobivanju podatkov.',
['delete_character'] = 'Izbriši trenutnega lika.',
['deleted_character'] = 'Lik je bil izbrisan',
['error_delete_character'] = 'Prišlo je do težave pri brisanju lika.',
['thank_you_for_registering'] = 'Registracija uspešna. Uživajte!',
['debug_xPlayer_get_first_name'] = 'Vrne vaše ime',
['debug_xPlayer_get_last_name'] = 'Vrne vaše priimek',
['debug_xPlayer_get_full_name'] = 'Vrne vaše polno ime',
['debug_xPlayer_get_sex'] = 'Vrne vaš spol',
['debug_xPlayer_get_dob'] = 'Vrne vaš datum rojstva',
['debug_xPlayer_get_height'] = 'Vrne vašo višino',
['error_debug_xPlayer_get_first_name'] = 'Prišlo je do težave pri pridobivanju vašega imena.',
['error_debug_xPlayer_get_last_name'] = 'Prišlo je do težave pri pridobivanju vašega priimka.',
['error_debug_xPlayer_get_full_name'] = 'Prišlo je do težave pri pridobivanju vašega polnega imena.',
['error_debug_xPlayer_get_sex'] = 'Prišlo je do težave pri pridobivanju vašega spola.',
['error_debug_xPlayer_get_dob'] = 'Prišlo je do težave pri pridobivanju vašega datuma rojstva.',
['error_debug_xPlayer_get_height'] = 'Prišlo je do težave pri pridobivanju vaše višine.',
['return_debug_xPlayer_get_first_name'] = 'Ime: %s',
['return_debug_xPlayer_get_last_name'] = 'Priimek: %s',
['return_debug_xPlayer_get_full_name'] = 'Ime: %s',
['return_debug_xPlayer_get_sex'] = 'Spol: %s',
['return_debug_xPlayer_get_dob'] = 'Datum rojstva: %s',
['return_debug_xPlayer_get_height'] = 'Višina: %s palcev',
['data_incorrect'] = 'Neveljavni podatki. Poskusite znova.',
['invalid_format'] = 'Neveljavna oblika podatkov. Poskusite znova.',
['no_identifier'] = '[ESX Identity]\nPrišlo je do težave pri nalaganju vašega lika!\nNapaka: manjkajoč-identifier\n\nTo je posledica manjkajočega identifikatorja. Prosimo, poskusite znova kasneje ali to težavo prijavite lastniku strežnika.',
['missing_identity'] = '[ESX Identity]\nPrišlo je do težave pri nalaganju vašega lika!\nNapaka: manjkajoč-identity\n\nZdi se, da manjka vaša identiteta. Poskusite znova.',
['deleted_identity'] = 'Lik izbrisan. Prosimo, ponovno se pridružite in ustvarite nov lik.',
['already_registered'] = 'Že ste registrirani.',
['invalid_firstname_format'] = 'Neveljavna oblika (Ime). Poskusite znova.',
['invalid_lastname_format'] = 'Neveljavna oblika (Priimek). Poskusite znova.',
['invalid_dob_format'] = 'Neveljavna oblika (Datum rojstva). Poskusite znova.',
['invalid_sex_format'] = 'Neveljavna oblika (Spol). Poskusite znova.',
['invalid_height_format'] = 'Neveljavna oblika (Višina). Poskusite znova.'
}
8 changes: 4 additions & 4 deletions [core]/esx_identity/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ local function checkDOBFormat(str)
if ((d <= 0) or (d > 31)) or ((m <= 0) or (m > 12)) or ((y <= Config.LowestYear) or (y > Config.HighestYear)) then
return false
elseif m == 4 or m == 6 or m == 9 or m == 11 then
return d < 30
return d <= 30
elseif m == 2 then
if y % 400 == 0 or (y % 100 ~= 0 and y % 4 == 0) then
return d < 29
return d <= 29
else
return d < 28
return d <= 28
end
else
return d < 31
return d <= 31
end
end

Expand Down

0 comments on commit ae4473b

Please sign in to comment.