Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/02/23 in all areas

  1. Version 1.0.1

    1454 downloads

    Preview: Welcome Cutscene Getting started I have created an event called: startWelcomeCutscene - the First parameter is the Gender - 0 = Male, 1 = Female, the Second parameter is the name shown during the welcome process (This can be null) To include a name on the Welcome Screen using Draw Text when the Plane appears use. Be sure to edit the variable: ServerName (Line 9) //Server Side player.call("startWelcomeCutscene",[0,"John"]) //Client Side mp.events.call("startWelcomeCutscene", 0, "John"); To just simply show the Welcome Screen (no name shown) //Server Side player.call("startWelcomeCutscene", [0]) //Client Side mp.events.call("startWelcomeCutscene", [0]); This will then start a screen fade out, load the correct items, clone your player for the cutscene, remove unnecessary players from the movie and then being cutscene. Once the movie has finished it will call: //Clientside mp.events.add("cutsceneEnded", () => { // Do something like new camera etc }); //Serverside mp.events.add("cutsceneEnded", (player) => { // Spawn Player }); So be sure to add this either Serverside or Clientside as it does both: call and callRemote for this function. I would recommend trigger your Spawn Process after the "cutsceneEnded" event. Special thanks to @Jer for providing the initial details from @DevGrab Things to note: If the server crashes - the jet may get left in the cutscene (even after re-log) - Action: Reload Game I have tried triggering mp.game.cam.doScreenFadeOut(100); when the cutscene is finished however I had no luck. However if your screen does go black, just call: mp.game.cam.doScreenFadeIn(0); If you want to build your own cutscenes in the future, be sure to check out how this cutscene was initially developed by going to: https://github.com/root-cause/v-decompiled-scripts-1868/blob/master/fm_intro.c Line 6963 shows you how to register certain models and also how to hide models (using Male and Female as example)
    1 point
  2. Version 1.1.0

    1885 downloads

    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."]); });
    1 point
×
×
  • Create New...