Skip to content

Commit

Permalink
feat: reload event
Browse files Browse the repository at this point in the history
  • Loading branch information
Frowmza committed Sep 20, 2024
1 parent 5213f53 commit ef5c165
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/client/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ if (core == 'qb' || core == 'qbx' && GetResourceState(frameworkName) == 'started

illeniumCompat();

RegisterCommand('reloadskin', async () => {
async function reloadSkin() {
const frameworkID = await getFrameworkID()
const health = GetEntityHealth(ped);
const maxhealth = GetEntityMaxHealth(ped);
Expand All @@ -84,4 +84,7 @@ RegisterCommand('reloadskin', async () => {
delay(1000)
SetEntityHealth(ped, health)
SetPedArmour(ped, armor)
}, false)
}

onNet('bl_appearance:client:reloadSkin', async () => reloadSkin)
RegisterCommand('reloadskin', async () => reloadSkin, false)

0 comments on commit ef5c165

Please sign in to comment.