mirror of
https://github.com/sergeyyarkov/altv-copchase-mod.git
synced 2026-10-11 10:19:42 +03:00
13 lines
454 B
JavaScript
13 lines
454 B
JavaScript
import alt from 'alt-server'
|
|
|
|
import config from '../../config.mjs'
|
|
|
|
alt.on('playerDeath', (player) => {
|
|
alt.emitClient(player, 'player:death')
|
|
alt.Player.all.forEach(_player => alt.emitClient(_player, 'player:notify', `Игрок <C>${player.name}</C> погиб`))
|
|
alt.setTimeout(() => {
|
|
player.spawn(config.spawn.x, config.spawn.y,config.spawn.z)
|
|
player.removeAllWeapons()
|
|
alt.emitClient(player, 'player:setInvincible')
|
|
}, 5000)
|
|
}) |