Jump to content

1 Screenshot

About This File

Very simple but complete chat written in vanilla js with arrows history navigation, time stamp, user colors prevention, character count, lower cased commands and scrollbar.
 

Ragemp chat api works perfectly

 

k2uXKAN.gif
55FvMKS.gifkk5LAZL.png

Settings 

Edit settings in advanced-chat/js/main.js

QG5yJAb.png

Install

  • Extract in to advanced-chat folder and copy it to client_packages
  • Add this somewhere client-side. (Eg: index.js)
mp.gui.chat.show(false); //Disables default RageMP Chat
const chat = mp.browsers.new('package://advanced-chat/index.html');
chat.markAsChat();
  • Add this somewhere server-side (Eg: index.js)
     
mp.events.add("playerChat", (player, message) => {
    mp.players.broadcast(`${player.name}: ${message}`);
});

 


What's New in Version 1.2.0   See changelog

Released

FIX: Keyboard layouts support, now using event.which instead of event.key for keybinds

  • Like 5
  • Mask 1

User Feedback

Recommended Comments

Brabus7

Posted

Input is not shown

pichalomo

Posted

5 hours ago, Brabus7 said:

Input is not shown

What keyboard layout/lenguage are you using? Just noticed I was using event.key instead of event.which so maybe thats the problem, I submitted a new version with the fix

GingerJM

Posted (edited)

This is very good and it works, but my /do and /me commands are not displayed with their respective text colors, how can I make the text display with the text in color?

 

 

these are my commands in JS:

 

mp.events.addCommand("me", (player, message) => {
    mp.players.broadcast(`!{ff00bd} ${player.name}: ${message}`);
});
 
mp.events.addCommand("do", (player, message) => {
    mp.players.broadcast(`!{fff300} ${player.name}: ${message}`);
});

 

 

Here in my commands do I have to change something to make it work with this script? 

 

EDIT: problem solved

 

Thank you.

Edited by GingerJM

Create an account or sign in to comment

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

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
×
×
  • Create New...