Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
temp fix Player prototype overwrite (closes #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxshady committed Jan 22, 2022
1 parent 34de1ab commit 0610893
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/alt-overwrite-banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,15 @@ import alt from 'alt-server'

log(`start a timer for ~cl~${___ALTV_DEV_SERVER_RECONNECT_PLAYERS_DELAY___}~w~ ms to reconnect players`)

const players = alt.Player.all

for (const p of players) {
p.dimension = defaultDimension
p.pos = initialPos
p.removeAllWeapons()
p.clearBloodDamage()
}

alt.setTimeout(() => {
// temp fix of https://github.com/altmp/altv-js-module/issues/106
const players = alt.Player.all

for (const p of players) {
p.dimension = defaultDimension
p.pos = initialPos
p.removeAllWeapons()
p.clearBloodDamage()
alt.emit('playerConnect', p)
}
}, ___ALTV_DEV_SERVER_RECONNECT_PLAYERS_DELAY___)
Expand Down

0 comments on commit 0610893

Please sign in to comment.