Personal tools

Lua/Client/Game/Functions/ShowPopup

From JC2-MP Documentation

< Lua‎ | Client‎ | Game
Jump to: navigation, search

Returns    none
Prototype    Game:ShowPopup(string message, boolean shouldShowBlueIcon)
Description    Shows a notification on the top-left of the screen, using the game's GUI.


Example

  1. function Popup(args)
  2. 	Game:ShowPopup(args.text, false)
  3. end
  4.  
  5. function PopupIcon(args)
  6. 	Game:ShowPopup(args.text, true)
  7. end
  8.  
  9. Console:Subscribe("popup", Popup)
  10. Console:Subscribe("popupicon", PopupIcon)

Console input

> popup Hello, I'm some popup text
> popupicon With icon

Result

Lua Game ShowPopup Example.png