Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IServerEvent

Hierarchy

  • IServerEvent

Index

Properties

anyResourceError

anyResourceError: (resourceName: string) => void

Type declaration

    • (resourceName: string): void
    • Parameters

      • resourceName: string

      Returns void

anyResourceStart

anyResourceStart: (resourceName: string) => void

Type declaration

    • (resourceName: string): void
    • Parameters

      • resourceName: string

      Returns void

anyResourceStop

anyResourceStop: (resourceName: string) => void

Type declaration

    • (resourceName: string): void
    • Parameters

      • resourceName: string

      Returns void

baseObjectCreate

baseObjectCreate: (baseObject: BaseObject) => void

Type declaration

baseObjectRemove

baseObjectRemove: (baseObject: BaseObject) => void

Type declaration

clientDeleteObject

clientDeleteObject: (player: Player) => void | boolean
remarks

Triggers if player deletes a object of task.

Type declaration

    • (player: Player): void | boolean
    • Parameters

      Returns void | boolean

clientRequestObject

clientRequestObject: (player: Player, model: number, position: Vector3) => void | boolean
remarks

Triggers if player request creation of a object, e.g for a task which is synced.

Type declaration

    • (player: Player, model: number, position: Vector3): void | boolean
    • Parameters

      Returns void | boolean

connectionQueueAdd

connectionQueueAdd: (connectionInfo: IConnectionInfo) => void

Type declaration

connectionQueueRemove

connectionQueueRemove: (connectionInfo: IConnectionInfo) => void

Type declaration

consoleCommand

consoleCommand: (name: string, ...args: string[]) => void

Type declaration

    • (name: string, ...args: string[]): void
    • Parameters

      • name: string
      • Rest ...args: string[]

      Returns void

entityEnterColshape

entityEnterColshape: (colshape: Colshape, entity: Entity) => void

Type declaration

entityLeaveColshape

entityLeaveColshape: (colshape: Colshape, entity: Entity) => void

Type declaration

explosion

explosion: (source: Player, type: ExplosionType, pos: Vector3, fx: number, target: Entity | null) => boolean | void

Type declaration

givePedScriptedTask

givePedScriptedTask: (source: Player, target: Ped, task: number) => void | boolean

Type declaration

    • (source: Player, target: Ped, task: number): void | boolean
    • Parameters

      Returns void | boolean

globalMetaChange

globalMetaChange: (key: string, value: any, oldValue: any) => void

Type declaration

    • (key: string, value: any, oldValue: any): void
    • Parameters

      • key: string
      • value: any
      • oldValue: any

      Returns void

globalSyncedMetaChange

globalSyncedMetaChange: (key: string, value: any, oldValue: any) => void

Type declaration

    • (key: string, value: any, oldValue: any): void
    • Parameters

      • key: string
      • value: any
      • oldValue: any

      Returns void

localMetaChange

localMetaChange: (player: Player, key: string, newValue: any, oldValue: any) => void

Type declaration

    • (player: Player, key: string, newValue: any, oldValue: any): void
    • Parameters

      • player: Player
      • key: string
      • newValue: any
      • oldValue: any

      Returns void

metaChange

metaChange: (target: BaseObject, key: string, value: any, oldValue: any) => void

Type declaration

    • (target: BaseObject, key: string, value: any, oldValue: any): void
    • Parameters

      • target: BaseObject
      • key: string
      • value: any
      • oldValue: any

      Returns void

netOwnerChange

netOwnerChange: (entity: Entity, owner: Player | null, oldOwner: Player | null) => void

Type declaration

pedDamage

pedDamage: (ped: Ped, attacker: Entity | null, healthDamage: number, armourDamage: number, weapon: number) => void | boolean

Type declaration

    • (ped: Ped, attacker: Entity | null, healthDamage: number, armourDamage: number, weapon: number): void | boolean
    • Parameters

      • ped: Ped
      • attacker: Entity | null
      • healthDamage: number
      • armourDamage: number
      • weapon: number

      Returns void | boolean

pedDeath

pedDeath: (ped: Ped, killer: Entity | null, weaponHash: number) => void | boolean

Type declaration

    • (ped: Ped, killer: Entity | null, weaponHash: number): void | boolean
    • Parameters

      • ped: Ped
      • killer: Entity | null
      • weaponHash: number

      Returns void | boolean

pedHeal

pedHeal: (ped: Ped, oldHealth: number, newHealth: number, oldArmour: number, newArmour: number) => void | boolean

Type declaration

    • (ped: Ped, oldHealth: number, newHealth: number, oldArmour: number, newArmour: number): void | boolean
    • Parameters

      • ped: Ped
      • oldHealth: number
      • newHealth: number
      • oldArmour: number
      • newArmour: number

      Returns void | boolean

playerAnimationChange

playerAnimationChange: (target: Player, oldAnimDict: number, newAnimDict: number, oldAnimName: number, newAnimName: number) => void

Type declaration

    • (target: Player, oldAnimDict: number, newAnimDict: number, oldAnimName: number, newAnimName: number): void
    • Parameters

      • target: Player
      • oldAnimDict: number
      • newAnimDict: number
      • oldAnimName: number
      • newAnimName: number

      Returns void

playerChangedVehicleSeat

playerChangedVehicleSeat: (player: Player, vehicle: Vehicle, oldSeat: number, seat: number) => void
remarks

The seat indexes start with 1 (driver seat).

Type declaration

    • (player: Player, vehicle: Vehicle, oldSeat: number, seat: number): void
    • Parameters

      Returns void

playerConnect

playerConnect: (player: Player) => void

Type declaration

    • Parameters

      Returns void

playerConnectDenied

playerConnectDenied: (reason: ConnectDeniedReason, name: string, ip: string, passwordHash: number, isDebug: boolean, branch: string, version: number, cdnURL: string, discordId: number) => void

Type declaration

    • (reason: ConnectDeniedReason, name: string, ip: string, passwordHash: number, isDebug: boolean, branch: string, version: number, cdnURL: string, discordId: number): void
    • Parameters

      • reason: ConnectDeniedReason
      • name: string
      • ip: string
      • passwordHash: number
      • isDebug: boolean
      • branch: string
      • version: number
      • cdnURL: string
      • discordId: number

      Returns void

playerDamage

playerDamage: (victim: Player, attacker: Entity | null, healthDamage: number, armourDamage: number, weaponHash: number) => void

Type declaration

    • (victim: Player, attacker: Entity | null, healthDamage: number, armourDamage: number, weaponHash: number): void
    • Parameters

      • victim: Player
      • attacker: Entity | null
      • healthDamage: number
      • armourDamage: number
      • weaponHash: number

      Returns void

playerDeath

playerDeath: (victim: Player, killer: Entity | null, weaponHash: number) => void

Type declaration

    • (victim: Player, killer: Entity | null, weaponHash: number): void
    • Parameters

      Returns void

playerDimensionChange

playerDimensionChange: (player: Player, oldDimension: number, newDimension: number) => void

Type declaration

    • (player: Player, oldDimension: number, newDimension: number): void
    • Parameters

      • player: Player
      • oldDimension: number
      • newDimension: number

      Returns void

playerDisconnect

playerDisconnect: (player: Player, reason: string) => void

Type declaration

    • (player: Player, reason: string): void
    • Parameters

      • player: Player
      • reason: string

      Returns void

playerEnteredVehicle

playerEnteredVehicle: (player: Player, vehicle: Vehicle, seat: number) => void
remarks

The seat indexes start with 1 (driver seat).

Type declaration

playerEnteringVehicle

playerEnteringVehicle: (player: Player, vehicle: Vehicle, seat: number) => void
remarks

The seat indexes start with 1 (driver seat).

Type declaration

playerHeal

playerHeal: (player: Player, oldHealth: number, newHealth: number, oldArmour: number, newArmour: number) => void

Type declaration

    • (player: Player, oldHealth: number, newHealth: number, oldArmour: number, newArmour: number): void
    • Parameters

      • player: Player
      • oldHealth: number
      • newHealth: number
      • oldArmour: number
      • newArmour: number

      Returns void

playerInteriorChange

playerInteriorChange: (player: Player, oldInterior: number, newInterior: number) => void

Type declaration

    • (player: Player, oldInterior: number, newInterior: number): void
    • Parameters

      • player: Player
      • oldInterior: number
      • newInterior: number

      Returns void

playerLeftVehicle

playerLeftVehicle: (player: Player, vehicle: Vehicle, seat: number) => void
remarks

The seat indexes start with 1 (driver seat).

Type declaration

playerRequestControl

playerRequestControl: (player: Player, target: Entity) => boolean | void

Type declaration

playerSpawn

playerSpawn: (player: Player) => void

Type declaration

    • Parameters

      Returns void

playerWeaponChange

playerWeaponChange: (player: Player, oldWeapon: number, weapon: number) => void

Type declaration

    • (player: Player, oldWeapon: number, weapon: number): void
    • Parameters

      • player: Player
      • oldWeapon: number
      • weapon: number

      Returns void

removeEntity

removeEntity: (object: Entity) => void

Type declaration

    • Parameters

      Returns void

requestSyncedScene

requestSyncedScene: (source: Player, sceneID: number) => void | boolean
remarks

You need to return true, otherwise the scene will not be synced.

Type declaration

    • (source: Player, sceneID: number): void | boolean
    • Parameters

      • source: Player
      • sceneID: number

      Returns void | boolean

resourceError

resourceError: (error: Error, file: string, line: number, stackTrace: string) => void

Type declaration

    • (error: Error, file: string, line: number, stackTrace: string): void
    • Parameters

      • error: Error
      • file: string
      • line: number
      • stackTrace: string

      Returns void

resourceStart

resourceStart: (errored: boolean) => void

Type declaration

    • (errored: boolean): void
    • Parameters

      • errored: boolean

      Returns void

resourceStop

resourceStop: () => void

Type declaration

    • (): void
    • Returns void

serverStarted

serverStarted: () => void

Type declaration

    • (): void
    • Returns void

startFire

startFire: (player: Player, fires: IFireInfo[]) => boolean | void

Type declaration

startProjectile

startProjectile: (player: Player, pos: Vector3, dir: Vector3, ammoHash: number, weaponHash: number) => boolean | void

Type declaration

    • (player: Player, pos: Vector3, dir: Vector3, ammoHash: number, weaponHash: number): boolean | void
    • Parameters

      Returns boolean | void

startSyncedScene

startSyncedScene: (source: Player, sceneID: number, startPos: Vector3, startRot: Vector3, animDictHash: number, entityAnimPairs: { animHash: number; entity: BaseObject }[]) => void | boolean
remarks

You need to return true, otherwise the scene will not be synced.

Type declaration

    • (source: Player, sceneID: number, startPos: Vector3, startRot: Vector3, animDictHash: number, entityAnimPairs: { animHash: number; entity: BaseObject }[]): void | boolean
    • Parameters

      Returns void | boolean

stopSyncedScene

stopSyncedScene: (source: Player, sceneID: number) => void | boolean
remarks

You need to return true, otherwise the scene will not be synced.

Type declaration

    • (source: Player, sceneID: number): void | boolean
    • Parameters

      • source: Player
      • sceneID: number

      Returns void | boolean

streamSyncedMetaChange

streamSyncedMetaChange: (object: BaseObject, key: string, value: any, oldValue: any) => void

Type declaration

    • (object: BaseObject, key: string, value: any, oldValue: any): void
    • Parameters

      • object: BaseObject
      • key: string
      • value: any
      • oldValue: any

      Returns void

syncedMetaChange

syncedMetaChange: (entity: Entity, key: string, value: any, oldValue: any) => void

Type declaration

    • (entity: Entity, key: string, value: any, oldValue: any): void
    • Parameters

      • entity: Entity
      • key: string
      • value: any
      • oldValue: any

      Returns void

updateSyncedScene

updateSyncedScene: (source: Player, startRate: number, sceneID: number) => void | boolean
remarks

You need to return true, otherwise the scene will not be synced.

Type declaration

    • (source: Player, startRate: number, sceneID: number): void | boolean
    • Parameters

      • source: Player
      • startRate: number
      • sceneID: number

      Returns void | boolean

vehicleAttach

vehicleAttach: (vehicle: Vehicle, attachedVehicle: Vehicle) => void

Type declaration

vehicleDamage

vehicleDamage: (vehicle: Vehicle, attacker: Entity | null, bodyHealthDamage: number, additionalBodyHealthDamage: number, engineHealthDamage: number, petrolTankDamage: number, weapon: number) => void

Type declaration

    • (vehicle: Vehicle, attacker: Entity | null, bodyHealthDamage: number, additionalBodyHealthDamage: number, engineHealthDamage: number, petrolTankDamage: number, weapon: number): void
    • Parameters

      • vehicle: Vehicle
      • attacker: Entity | null
      • bodyHealthDamage: number
      • additionalBodyHealthDamage: number
      • engineHealthDamage: number
      • petrolTankDamage: number
      • weapon: number

      Returns void

vehicleDestroy

vehicleDestroy: (vehicle: Vehicle) => void

Type declaration

vehicleDetach

vehicleDetach: (vehicle: Vehicle, detachedVehicle: Vehicle) => void

Type declaration

vehicleHorn

vehicleHorn: (vehicle: Vehicle, player: Player, state: boolean) => boolean | void

Type declaration

    • (vehicle: Vehicle, player: Player, state: boolean): boolean | void
    • Parameters

      Returns boolean | void

vehicleSiren

vehicleSiren: (vehicle: Vehicle, state: boolean) => void

Type declaration

    • (vehicle: Vehicle, state: boolean): void
    • Parameters

      Returns void

voiceConnection

voiceConnection: (state: VoiceConnectionState) => void

Type declaration

weaponDamage

weaponDamage: (source: Player, target: Entity, weaponHash: number, damage: number, offset: Vector3, bodyPart: BodyPart) => number | boolean | void

Type declaration

    • Parameters

      Returns number | boolean | void