Jump to content

Custom chat 1.0.2

   (4 reviews)

4 Screenshots

About This File

This is a simple example of using a custom chat in RAGE MP.

You can set time of hide chat from chat.js:

hide_chat: 15000 // in milliseconds

 


What's New in Version 1.0.1   See changelog

Released

Scroll has been added to the left side of the screen.

To change scroll position, select one of the css files:

  • main_right.cssmain_right.min.css - For scrolling on the right side of the screen.
  • main_left.cssmain_left.min.css - For scrolling on the right side of the screen.
<link rel="stylesheet" type="text/css" href="style/main_left.min.css" media="screen">

 

  • Like 12

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

Captien

   4 of 4 members found this review helpful 4 / 4 members

beast resource...
Finally something useful for reference..

Link to review
materia

· Edited by materia

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

Nice resource, I am trying to implement it on my server right now and found that everything in chat/js/chat.js inside

$(document).ready(function() { ... }

is being ignored or I am doing something wrong... Found that out when I was trying to supress the mouse cursor if the player is holding "W" while starting to chat with "T" so he can continue accelerate while chatting if he decides to.

Edit: never mind.. My bad, I was missing a path for it. Great Job!

Link to review
Tellarion

   4 of 5 members found this review helpful 4 / 5 members

Very good. Thank you. Used this in my project.

Link to review
Andzhu

  
Quote
$(document).ready(function()
{
    chat.container = $("#chat ul#chat_messages");
    hide();
    $(".ui_element").show();
    $("body").keydown(function(event)
    {
        if (event.which == 84 && chat.input == null
            && chat.active == true) {
            enableChatInput(true);
            event.preventDefault();
            show();
        }
        else if (event.which == 13 && chat.input != null) {
            var value = chat.input.children("input").val();
 
            if (value.length > 0) {
                chat.previous = value;
                if (value[0] == "/") {
                    value = value.substr(1);
 
                    if (value.length > 0 && value.length <= 100)
                        mp.invoke("command", value);
                }
                else {
                    if (value.length <= 100)
                        mp.invoke("chatMessage", value);
                }
            }
            enableChatInput(false);
            hide();
        }
        else if (event.which == 27 && chat.input != null) {
            enableChatInput(false);
            hide();
        }
        else if (event.which == 38 && chat.input != null) {
            chat.input.children("input").val(chat.previous);
        }
    });
      // Event handler for receiving chat messages
    mp.events.add("chat:push", (message) => {
        // Call the addChatMessage function to inject the message into the chat
        chatAPI.push(message);
    });
});

for 1.1 

good

Link to review
×
×
  • Create New...