About This File
This resource introduces the known chat scaleform from GTA:O. This chat supports (TEAM, LOCAL, GLOBAL) chats.
CONTROLS:
- T (GLOBAL chat)
- Y (TEAM chat)
- U (LOCAL chat)
- alt + shift (Changes language from English to the secondary mapped language)
- PAGE_UP (Scroll history up) works only when input is opened
- PAGE_DOWN (Scroll history down) works only when input is opened
Known Issues:
- Message colors aren't supported due to scaleform
- Chat supports extra language besides English, but the language should be mapped
Language Mapping:
For more information about how to language map, please click here
API:
Client-side API
// Client side // Property getter/setter Boolean (Disables/Enables chat input) mp.gui.chat.disabledInput = true; mp.gui.chat.disabledInput // Property getter Boolean (Check if chat is open) mp.gui.chat.enabled; // Function to clear localPlayer's chat feed mp.gui.chat.clear(); // Trigger chat's visibility (visible: Boolean); mp.gui.chat.visible(visible); /* * msg: string * scope: string (message's scope (Author [scope] msg)) * author: string (Default: [SERVER]) * authorColor: int hudColorID (https://wiki.rage.mp/index.php?title=Fonts_and_Colors) (Default: white) */ mp.gui.chat.sendMessage(msg, scope, author, authorColor); /* * Registers command locally for client. * name: string (command name) * arg1: command's arguement */ mp.gui.chat.addCommand(name, function (arg1, arg2) { // do whatever... }); /* * Removes command locally for client. * name: string (command name) */ mp.gui.chat.removeCommand(name);
Server-side API
/* * Sends message to all players in server * msg: string * scope: string (message's scope (Author [scope] msg)) * author: string (Default: [SERVER]) * authorColor: int hudColorID (https://wiki.rage.mp/index.php?title=Fonts_and_Colors) (Default: white) */ mp.players.announce(msg, scope, author, authorColor); /* * Sends messaage to all players in specified dimension * dimension: int * msg: string * scope: string (message's scope (Author [scope] msg)) * author: string (Default: [SERVER]) * authorColor: int hudColorID (https://wiki.rage.mp/index.php?title=Fonts_and_Colors) (Default: white) */ mp.players.announceInDimension(dimension, msg, scope, author, authorColor); /* * Sends messaage to all players in specified dimension * position: Vector3 * range: int * msg: string * scope: string (message's scope (Author [scope] msg)) * author: string (Default: [SERVER]) * authorColor: int hudColorID (https://wiki.rage.mp/index.php?title=Fonts_and_Colors) (Default: white) */ mp.players.announceInRange(position, range, msg, scope, author, authorColor); /* * Registers commands in chat * name: string (command name) * player: command executer * arg1: Arguement after command */ mp.events.addChatCommand(name, function (player, arg1, arg2) { // Do what you want... }); /* * Removes command from server * name: string (command name) */ mp.events.removeChatCommand(name); /* * Sends message to all players in server * msg: string * scope: string (message's scope (Author [scope] msg)) * author: string (Default: [SERVER]) * authorColor: int hudColorID (https://wiki.rage.mp/index.php?title=Fonts_and_Colors) (Default: white) */ player.sendChatMessage(msg, scope, author, authorColor); // Clears player's chat player.clearChat();
Teams resource is supported.
If you have any issues don't hesitate to contact me on Discord/Forums DM.
You're not allowed to redistribute this resource without my permission.
What's New in Version 1.2.0 See changelog
Released
Following update was provided by Тиф:
- Couple of bugs fixed
- Added extra special keys
- Added language support mapping (Supports one extra language beside English