mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-05 17:13:29 +08:00
1.8 KiB
1.8 KiB
Table: menu_event
Table containing all possible events to which you can respond.
Fields (6)
PlayerLeave
Event that is triggered when a player leave the game session. Exemple Usage:
event.register_handler(menu_event.PlayerLeave, function (player_name)
log.info(player_name)
end)
- Type:
integer
PlayerJoin
Event that is triggered when a player join the game session. Exemple Usage:
event.register_handler(menu_event.PlayerJoin, function (player_name, player_id)
log.info(player_name)
log.info(player_id)
end)
- Type:
integer
PlayerMgrInit
Event that is triggered when the player manager initialize. Usually called when we are joining a session. Exemple Usage:
event.register_handler(menu_event.PlayerMgrInit, function ()
log.info("Player manager inited, we just joined a session.")
end)
- Type:
integer
PlayerMgrShutdown
Event that is triggered when the player manager shutdown. Usually called when we are leaving a session. Exemple Usage:
event.register_handler(menu_event.PlayerMgrShutdown, function ()
log.info("Player manager inited, we just joined a session.")
end)
- Type:
integer
ChatMessageReceived
Event that is triggered when we receive a in-game chat message. Exemple Usage:
event.register_handler(menu_event.ChatMessageReceived, function (player_id, chat_message)
log.info(player_id)
log.info(chat_message)
end)
- Type:
integer
ScriptedGameEventReceived
Event that is triggered when we receive a scripted game event. Exemple Usage:
event.register_handler(menu_event.ScriptedGameEventReceived, function (player_id, script_event_args)
log.info(player_id)
log.info(script_event_args)
end)
- Type:
integer