Skip to content

VimpClientBuiltinEvents

@vimp-mp/types 2.0.1

Interface · Client API

Built-in client-side events. Handlers receive a single argument with the type shown here.

ts
interface VimpClientBuiltinEvents

Members

blipCreated

ts
blipCreated: (blip: Blip | null) => void

Fires when the client learns about a server blip.

blipDestroyed

ts
blipDestroyed: (blip: Blip | null) => void

Fires when a server blip is removed from multiplayer state.

blipStreamIn

ts
blipStreamIn: (blip: Blip | null) => void

Fires when a server blip receives a local map handle.

blipStreamOut

ts
blipStreamOut: (blip: Blip | null) => void

Fires when a server blip releases its local map handle.

chatMessage

ts
chatMessage: (payload: ChatMessagePayload) => void

Fires when a chat message is delivered by the server.

colshapeCreated

ts
colshapeCreated: (colshape: Colshape | null) => void

Fires when the client learns about a server colshape.

colshapeDestroyed

ts
colshapeDestroyed: (colshape: Colshape | null) => void

Fires when a server colshape is removed from multiplayer state.

colshapeStreamIn

ts
colshapeStreamIn: (colshape: Colshape | null) => void

Fires when a server colshape enters the streaming range.

colshapeStreamOut

ts
colshapeStreamOut: (colshape: Colshape | null) => void

Fires when a server colshape leaves the streaming range.

connectionStateChanged

ts
connectionStateChanged: (state: ConnectionStateChangedPayload) => void

Fires after the multiplayer connection state changes.

keyDown

ts
keyDown: (key: number) => void

Virtual-Key code (Win32 VK_*).

keyUp

ts
keyUp: (key: number) => void

Fires when a keyboard key is released; receives a Win32 virtual-key code.

markerCreated

ts
markerCreated: (marker: Marker | null) => void

Fires when the client learns about a server marker.

markerDestroyed

ts
markerDestroyed: (marker: Marker | null) => void

Fires when a server marker is removed from multiplayer state.

markerStreamIn

ts
markerStreamIn: (marker: Marker | null) => void

Fires when a server marker enters the streaming range.

markerStreamOut

ts
markerStreamOut: (marker: Marker | null) => void

Fires when a server marker leaves the streaming range.

objectCreated

ts
objectCreated: (object: Object | null) => void

Fires when the client learns about a server object.

objectDestroyed

ts
objectDestroyed: (object: Object | null) => void

Fires when a server object is removed from multiplayer state.

objectStreamIn

ts
objectStreamIn: (object: Object | null) => void

Fires when a server object receives a local GTA handle.

objectStreamOut

ts
objectStreamOut: (object: Object | null) => void

Fires when a server object releases its local GTA handle.

pedCreated

ts
pedCreated: (ped: Ped | null) => void

Fires when the client learns about a server ped.

pedDestroyed

ts
pedDestroyed: (ped: Ped | null) => void

Fires when a server ped is removed from multiplayer state.

pedStreamIn

ts
pedStreamIn: (ped: Ped | null) => void

Fires when a server ped receives a local GTA handle.

pedStreamOut

ts
pedStreamOut: (ped: Ped | null) => void

Fires when a server ped releases its local GTA handle.

playerConnected

ts
playerConnected: (player: Player) => void

Fires when a player wrapper is added to the client registry.

playerDisconnected

ts
playerDisconnected: (player: Player) => void

Fires when a player connection closes and its wrapper is removed.

playerEnterVehicle

ts
playerEnterVehicle: (payload: PlayerVehicleEventPayload) => void

Fires after the local player enters a vehicle seat.

playerLeaveVehicle

ts
playerLeaveVehicle: (payload: PlayerVehicleEventPayload) => void

Fires after the local player leaves a vehicle seat.

playerStreamIn

ts
playerStreamIn: (player: Player) => void

Fires when a remote player's native ped enters the streaming range.

playerStreamOut

ts
playerStreamOut: (player: Player) => void

Fires when a remote player's native ped leaves the streaming range.

render

ts
render: () => void

Fires once for each rendered frame. Receives no payload.

streamSyncedMetaChange

ts
streamSyncedMetaChange: (payload: StreamSyncedMetaChangePayload) => void

Fires whenever a stream-synced meta key changes for an entity currently visible to this client — including every key in the initial snapshot at StreamIn (with oldValue: undefined) and on Delete (with newValue: undefined). Does NOT fire when an entity leaves the streaming range (the local store is just cleared silently).

vehicleCreated

ts
vehicleCreated: (vehicle: Vehicle | null) => void

Fires when the client learns about a server vehicle.

vehicleDestroyed

ts
vehicleDestroyed: (vehicle: Vehicle | null) => void

Fires when a server vehicle is removed from multiplayer state.

vehicleStreamIn

ts
vehicleStreamIn: (vehicle: Vehicle | null) => void

Fires when a server vehicle receives a local GTA handle.

vehicleStreamOut

ts
vehicleStreamOut: (vehicle: Vehicle | null) => void

Fires when a server vehicle releases its local GTA handle.

voiceChannelChanged

ts
voiceChannelChanged: (payload: VoiceChannelChangedPayload) => void

Fires after the local player's active voice channel changes.

voiceChannelsChanged

ts
voiceChannelsChanged: () => void

Fires when the server-provided voice-channel list changes.

voiceError

ts
voiceError: (payload: VoiceErrorPayload) => void

Fires when the voice subsystem reports a recoverable or fatal error.

voiceStart

ts
voiceStart: (player: Player) => void

Fires when a remote player starts transmitting voice audio.

voiceStop

ts
voiceStop: (player: Player) => void

Fires when a remote player stops transmitting voice audio.

VIMP developer documentation