Jump to content
Brad

[TUTORIAL/4.4R3] Intro video

Recommended Posts

Hello today i will teach you to put a small video before spawn :)
(Sorry for my english, and Happy new year :D)

 

First, create a folder called "videos" in the root of your Altis mission ( You must place your video inside this folder! )

Second, go into the Functions.h file again at the root of your mission!

You must then add the following : 

class Life_Client_Core {
    tag = "life";

    class Master_Directory {
        file = "core";
        class initCiv {};
        class initCop {};
        class initMedic {};
        class setupActions {};
        class setupEVH {};
        class survival {};
        class welcomeNotification {};
        class introCam {}; // add this
    };

 

Then, go to your core folder and add a file fn_introCam.sqf

Add this inside the file : 

/*
    File: fn_introCam.sqf
    Author: Brad 
*/
["videos\intro_preview.ogv"] spawn BIS_fnc_playVideo;

After this , go to Dialog /Function and open fn_spawnConfirm.sqf 
And add this 

 

if(life_firstSpawn) then {  
    life_firstSpawn = false;  
    [] call life_fnc_welcomeNotification;  
    [] spawn life_fnc_introCam;  // add this
};  
[] call life_fnc_hudSetup; 

Do not forget! The video file must be in .ogv

if you want to test it , you can download intro_preview.ogv

It's the end :)

intro_preview.ogv

Edited by Brad
updated code
  • Like 2

Share this post


Link to post
Share on other sites
On 07/01/2017 at 7:37 PM, STG_SilentF0x said:

Can i make it so, that we can skip the video?

Why add the intro, if you want to add an option to pass it? Do not add it

Share this post


Link to post
Share on other sites

I have an error :

 
[“videos\P.ogv”] spawn BIS_fnc_playVi>
 9:35:50   Error position: <“videos\P.ogv”] spawn BIS_fnc_playVi>
 9:35:50   Error Invalid number in expression
 9:35:50 File core\fn_IntroCam.sqf [life_fnc_IntroCam], line 5
 9:35:50 Error in expression <IntroCam.sqf [life_fnc_IntroCam]"
 
 
 
 
[“videos\P.ogv”] spawn BIS_fnc_playVi>
 9:35:50   Error position: <“videos\P.ogv”] spawn BIS_fnc_playVi>
 9:35:50   Error Invalid number in expression
 9:35:50 File core\fn_IntroCam.sqf [life_fnc_IntroCam], line 5

 

i don't now what can i do 

plz helpme

Share this post


Link to post
Share on other sites
9 hours ago, Lokodmanga said:

Dude, is have any way to edit this code for all the times when I log in this script works? Just working for me to new characters..

Dude.

did you even look at the code.

take a guess what life_firstSpawn is.

Share this post


Link to post
Share on other sites
23 hours ago, Lokodmanga said:

I tried remove this, and ohter put = true.. Nothin

if (life_firstSpawn) then {
    life_firstSpawn = false;

No you literally put the line above the fucking firstspawn statement -.-

this has been asked on discord And here multiple times. How do you expect to runs a server when you don't even know where rpt logs as you told me last night???? 

Screenshot_20180209-101836.thumb.png.0c5fae84c19a361e420e168800c03ec8.pngScreenshot_20180209-102200.thumb.png.1c13225ceaf9c6aaa3bc545c9af99d03.png

Edited by Deadlesszombie

Share this post


Link to post
Share on other sites

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

×