Jump to content
nomad924

Play video for all players on the server

Recommended Posts

Hi. I´ve been trying to make a video appear in each client screen when the mission (MP) starts, but i dont even get it to work for Single Player. Can someone help me with this? Doing my research i have ended up with this--> My init.sqf:

 

_video = "\scripts\videos\tripulacion_prescindible.ogv";
_screen = "Land_TripodScreen_01_large_F" createVehicle (player modelToWorld [0, 10, 0]);
_screen setObjectTextureGlobal [0, _video];
[_video, [10, 10]] remoteExec ["BIS_fnc_playVideo", 0, true];

 

Any idea? Video is 6mb and last for 36 seconds

Share this post


Link to post
Share on other sites
/////
 _video = "scripts\videos\tripulacion_prescindible.ogv"; //if it's in your mission folder no \ at the begining of the path
_screen = "Land_TripodScreen_01_large_F" createVehicle (player modelToWorld [0, 10, 0]);
_screen setObjectTextureGlobal [0, _video];
[_video, [10, 10]] remoteExec ["BIS_fnc_playVideo", 0, true];// don't remote exec this since each player will have their screen, your code will create MULTIPLE screens BTW (as many as there are players)

  

 

  • Like 1

Share this post


Link to post
Share on other sites

Please i need some help.. i have an addaction to start the movie

 

this addAction["Briefing", "'scripts\tv.sqf' remoteExec ['execVM']", nil, 6, True, True, "", "(_target distance _this) < 4"];

 

tv.sqf

if(!isServer) exitWith {};
t1 setobjecttextureglobal [0,"videos\brif.ogv"];
["videos\brif.ogv",[10,10]] remoteExec ["bis_fnc_playvideo", ([0, -2] select isDedicated), true];

 

it works well and exec on all machines, but if the player disconnect, and connect again the video play again..

 

How can the script exec once, so it will not repeat if client disconnect?

Share this post


Link to post
Share on other sites
4 hours ago, Junior Prado said:

ed), true];

true means add it to the JIP queue, so it will play for connecting clients. Just remove the true parameter.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×