Scaleform Messages 1.1.0

   (5 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)

 




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

ragempdev

Report ·

   5 of 5 members found this review helpful 5 / 5 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) };

 

Share this review


Link to review
n0minal

Report ·

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

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

Share this review


Link to review
m4a_X

Report ·

  

Game-Crash ?

Share this review


Link to review
manaszon

Report ·

· Edited by manaszon

  

Very useful script, thank you very much!

Share this review


Link to review
Bonus

Report ·

  

Nice, exactly what I was searching for.

Share this review


Link to review