IServerEvent
Interface Definition
ts
interface IServerEvent {
anyResourceError: (resourceName: string) => void;
anyResourceStart: (resourceName: string) => void;
anyResourceStop: (resourceName: string) => void;
consoleCommand: (name: string, ...args: string[]) => void;
entityEnterColshape: (colshape: Colshape, entity: Entity) => void;
entityLeaveColshape: (colshape: Colshape, entity: Entity) => void;
explosion: (source: Player, type: ExplosionType, pos: shared.Vector3, fx: number, target: Entity) => boolean | void;
netOwnerChange: (entity: Entity, owner: Player, oldOwner: Player) => void;
playerChangedVehicleSeat: (player: Player, vehicle: Vehicle, oldSeat: number, seat: number) => void;
playerConnect: (player: Player) => void;
beforePlayerConnect: (connectionInfo: IConnectionInfo) => boolean | string | void;
playerDamage: (victim: Player, attacker: Entity, healthDamage: number, armourDamage: number, weaponHash: number) => void;
playerDeath: (victim: Player, killer: Entity, weaponHash: number) => void;
playerDisconnect: (player: Player, reason: string) => void;
playerEnteredVehicle: (player: Player, vehicle: Vehicle, seat: number) => void;
playerEnteringVehicle: (player: Player, vehicle: Vehicle, seat: number) => void;
playerLeftVehicle: (player: Player, vehicle: Vehicle, seat: number) => void;
removeEntity: (object: Entity) => void;
resourceStart: (errored: boolean) => void;
resourceStop: () => void;
resourceError: (error: Error, file: string, line: number, stackTrace: string) => void;
syncedMetaChange: (entity: Entity, key: string, value: any, oldValue: any) => void;
streamSyncedMetaChange: (entity: Entity, key: string, value: any, oldValue: any) => void;
globalMetaChange: (key: string, value: any, oldValue: any) => void;
globalSyncedMetaChange: (key: string, value: any, oldValue: any) => void;
vehicleAttach: (vehicle: Vehicle, attachedVehicle: Vehicle) => void;
vehicleDestroy: (vehicle: Vehicle) => void;
vehicleDetach: (vehicle: Vehicle, detachedVehicle: Vehicle) => void;
weaponDamage: (source: Player, target: Entity, weaponHash: number, damage: number, offset: shared.Vector3, bodyPart: BodyPart) => boolean | void;
startFire: (player: Player, fires: Array<IFireInfo>) => boolean | void;
startProjectile: (player: Player, pos: shared.Vector3, dir: shared.Vector3, ammoHash: number, weaponHash: number) => boolean | void;
playerWeaponChange: (player: Player, oldWeapon: number, weapon: number) => boolean | void;
vehicleDamage: (vehicle: Vehicle, attacker: Entity, bodyHealthDamage: number, additionalBodyHealthDamage: number, engineHealthDamage: number, petrolTankDamage: number, weapon: number) => void;
localMetaChange: (player: Player, key: string, oldValue: any, newValue: any) => void;
connectionQueueAdd: (connectionInfo: IConnectionQueueInfo) => void;
connectionQueueRemove: (connectionInfo: IConnectionQueueInfo) => void;
serverStarted: () => void;
playerRequestControl: (player: Player, target: Entity) => boolean | void;
playerAnimationChange: (target: Player, oldAnimDict: number, newAnimDict: number, oldAnimName: number, newAnimName: number) => void;
playerInteriorChange: (player: Player, oldInterior: number, newInterior: number) => void;
};