EventMap
Defined in: client/api.d.ts:1038
Native events dispatched through Events.on. Each property is the exact callback argument tuple for that event.
Properties
Section titled “Properties”chatMessage
Section titled “chatMessage”chatMessage: [
ChatMessageEvent]
Defined in: client/api.d.ts:1052
Dispatched when the client receives a framework chat-message RPC, before the built-in chat overlay is updated.
chatSend
Section titled “chatSend”chatSend: [
string]
Defined in: client/api.d.ts:1057
Dispatched synchronously when the local player submits a chat line, before it is sent. Return false to keep the line client-side; async handlers cannot block it. Not dispatched for Chat.send.
cityPartChanged
Section titled “cityPartChanged”cityPartChanged: [
CityPartChangeEvent]
Defined in: client/api.d.ts:1082
Dispatched when the local player crosses into a different city district.
dialogAnswer
Section titled “dialogAnswer”dialogAnswer: [
QuestionAnswerEvent]
Defined in: client/api.d.ts:1072
Dispatched when a prompt shown by Ui.showDialog resolves. answerId is 1 for the accepting option and 2 for the declining one.
lockpickResult
Section titled “lockpickResult”lockpickResult: [
LockpickResultEvent]
Defined in: client/api.d.ts:1077
Dispatched when a minigame started by Ui.startLockpick ends, including when Ui.cancelLockpick closes it.
playerDamage
Section titled “playerDamage”playerDamage: [
PlayerDamageEvent]
Defined in: client/api.d.ts:1097
Dispatched immediately after the local player receives native damage.
questionAnswer
Section titled “questionAnswer”questionAnswer: [
QuestionAnswerEvent]
Defined in: client/api.d.ts:1067
Dispatched when a prompt shown by Ui.showQuestion resolves. Not dispatched for Ui.showDialog, which raises dialogAnswer, nor for a prompt closed by Ui.cancelQuestion.
radioPowerChange
Section titled “radioPowerChange”radioPowerChange: [
RadioPowerChangeEvent]
Defined in: client/api.d.ts:1092
Dispatched after the local player’s vehicle radio is turned on or off.
radioStationChange
Section titled “radioStationChange”radioStationChange: [
RadioStationChangeEvent]
Defined in: client/api.d.ts:1087
Dispatched after the local player’s vehicle radio changes station.
resourceStart
Section titled “resourceStart”resourceStart: [
string]
Defined in: client/api.d.ts:1042
Dispatched after a resource entry point has run and immediately before the resource becomes running.
resourceStop
Section titled “resourceStop”resourceStop: [
string]
Defined in: client/api.d.ts:1047
Dispatched while a resource is stopping, before its stop callback, timers, exports, and event handlers are cleaned up.
shopOpen
Section titled “shopOpen”shopOpen: [
ShopOpenEvent]
Defined in: client/api.d.ts:1062
Dispatched synchronously before Mafia II’s native shop menu opens. Return false to suppress it entirely: no menu is drawn and no shop camera transition starts, which is what replacing the shop with a custom interface needs. Async handlers cannot block it. The server still receives playerShopEnter.
