Scaleform Messages 1.1.0

   (8 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 12



User Feedback

Recommended Comments

There are no comments to display.

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