mirror of
https://github.com/sergeyyarkov/altv-copchase-mod.git
synced 2026-10-11 10:19:42 +03:00
22 lines
608 B
JavaScript
22 lines
608 B
JavaScript
import alt from 'alt-server'
|
|
import { copchase } from '../copchase.mjs'
|
|
|
|
alt.on('playerLeftVehicle', player => {
|
|
if (copchase.isStarted && player.id === copchase.suspect.id) {
|
|
|
|
if (!copchase.isSuspectLeavesCar) {
|
|
copchase.isSuspectLeavesCar = true
|
|
player.giveWeapon('0x1B06D571', 25, true)
|
|
|
|
copchase.players.forEach(_player => {
|
|
if (_player.id !== copchase.suspect.id) {
|
|
_player.giveWeapon('0x1B06D571', 50, true);
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
if (copchase.isStarted && player.id !== copchase.suspect.id) {
|
|
player.giveWeapon('0x3656C8C1', 100, false)
|
|
}
|
|
}) |