Jump to content
RAGE Multiplayer Community

Scaleform Messages 1.1.0

   (9 reviews)

8 Screenshots

About This File

This resource lets you display GTA V/Online styled shard messages.

Installing:

Put scaleform_messages into your server's client_packages directory, then add require('scaleform_messages/index.js'); to index.js.

Available events:

ShowMidsizedMessage // title, message, time = 5000
ShowMidsizedShardMessage // title, message, bgColor, useDarkerShard, condensed, time = 5000
ShowWeaponPurchasedMessage // title, weaponName, weaponHash, time = 5000
ShowPlaneMessage // title, planeName, planeHash, time = 5000
ShowShardMessage // title, message, titleColor, bgColor, time = 5000

Clientside example (will show different messages when you press numpad0 - numpad6):

mp.keys.bind(0x60, false, () => {
    mp.events.call("ShowMidsizedMessage", "Title", "ShowMidsizedMessage example");
    // or: mp.game.ui.messages.showMidsized("Title", "ShowMidsizedMessage example");
});

mp.keys.bind(0x61, false, () => {
    mp.events.call("ShowMidsizedShardMessage", "Title", "ShowMidsizedShardMessage example", 21, false, false);
    // or: mp.game.ui.messages.showMidsizedShard("Title", "ShowMidsizedShardMessage example", 21, false, false);
});

mp.keys.bind(0x62, false, () => {
    mp.events.call("ShowMidsizedShardMessage", "Title", "ShowMidsizedShardMessage example 2 (condensed = true)", 21, false, true);
    // or: mp.game.ui.messages.showMidsizedShard("Title", "ShowMidsizedShardMessage example 2 (condensed = true)", 21, false, true);
});

mp.keys.bind(0x63, false, () => {
    mp.events.call("ShowWeaponPurchasedMessage", "Title", "ShowWeaponPurchasedMessage example", -2084633992);
    // or: mp.game.ui.messages.showWeaponPurchased("Title", "ShowWeaponPurchasedMessage example", -2084633992);
});

mp.keys.bind(0x64, false, () => {
    mp.events.call("ShowPlaneMessage", "Title", "ShowPlaneMessage example", 788747387);
    // or: mp.game.ui.messages.showPlane("Title", "ShowPlaneMessage example", 788747387);
});

mp.keys.bind(0x65, false, () => {
    mp.events.call("ShowShardMessage", "Title", "ShowShardMessage example");
    // or: mp.game.ui.messages.showShard("Title", "ShowShardMessage example");
});

mp.keys.bind(0x66, false, () => {
    mp.events.call("ShowShardMessage", "Title", "ShowShardMessage example (colored)", 0, 11);
    // or: mp.game.ui.messages.showShard("Title", "ShowShardMessage example (colored)", 0, 11);
});

Serverside example (will show a wasted message when you die):

mp.events.add('playerDeath', (player) => {
    player.call("ShowShardMessage", ["~r~Wasted", "You died."]);
});

 


What's New in Version 1.1.0   See changelog

Released

1.1.0 - clientside:

Thanks to @ragempdev's tip, now you can access functions from mp.game.ui.messages, which lets you do:

mp.game.ui.messages.showMidsized("Title", "ShowMidsizedMessage example");

instead of:

mp.events.call("ShowMidsizedMessage", "Title", "ShowMidsizedMessage example");

-----

mp.game.ui.messages functions:

mp.game.ui.messages.showShard(title, message, titleColor, bgColor, time = 5000)
mp.game.ui.messages.showWeaponPurchased(title, weaponName, weaponHash, time = 5000)
mp.game.ui.messages.showPlane(title, planeName, planeHash, time = 5000)
mp.game.ui.messages.showMidsized(title, message, time = 5000)
mp.game.ui.messages.showMidsizedShard(title, message, bgColor, useDarkerShard, condensed, time = 5000)

 

  • Like 16

User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest

ragempdev

   8 of 8 members found this review helpful 8 / 8 members

+rep

 

suggestion: to make it easier, you could just make your functions globally visible, like:

mp.game.messages = { showShard: (title, msg) => mp.events.call("ShowShardMessage", title, msg) };

 

Link to comment
Bonus

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

Nice, exactly what I was searching for.

Link to comment
Jengas

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

👍👍

Link to comment
manaszon

· Edited by manaszon

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

Very useful script, thank you very much!

Link to comment
n0minal

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

Nice man, glad to see you arround, you do some really cool stuff, keep it up :)

Link to comment
m4a_X

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

Game-Crash ?

Link to comment
GGTTPO100AJIEX_YT

  

Hello! Great resource, but I have one problem. Where to get colors? As I see, HEX does not work, I need 0 for white, 11 for blue and so on. But how to get the number for green, for example? Is there any base of colors for this resource (shardMessage)?

Link to comment
×
×
  • Create New...