Jump to content

[SCALEFORM] Chat 1.2.0

   (8 reviews)

2 Screenshots

About This File

This resource introduces the known chat scaleform from GTA:O. This chat supports (TEAM, LOCAL, GLOBAL) chats.

CONTROLS:

  • (GLOBAL chat)
  • (TEAM chat)
  • (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
  • Like 2

User Feedback

Create an account or sign in to leave a review

You need to be a member in order to leave a review

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

rgnbgnhnd

   2 of 2 members found this review helpful 2 / 2 members

Super epic beast mega epic

Link to review
Joshua

   2 of 2 members found this review helpful 2 / 2 members

Sick

Link to review
Captien

   1 of 1 member found this review helpful 1 / 1 member

Seems epic to me tho

513832303164915762.png?v=1

Link to review
hubba

   1 of 2 members found this review helpful 1 / 2 members

👳‍♀️

Link to review
×
×
  • Create New...