Jump to content
Sign in to follow this  
Anteq Iney

The image from the camera to the billboard on the server

Recommended Posts

Hello, I made a script that displays the image from a video camera on a billboard , It works on the LAN server, but there is no image on the dedicated server, I need to make that after interacting with the camera, the image appears on the billboard and everyone on the server can see it. In the same time in order not to load the server, the image should be processed not on the server but on the client.
If the player has PIP enabled, he should see an image.
Please tell me how to do it
My script:

if (isDedicated) then
{
	
[] spawn {

cam = "camera" camCreate [0,0,0]; 
cam cameraEffect ["Internal", "Back", "uavrtt"]; 
cam camSetFov 0.5;
cam attachTo [videoCamera, [0,0,0.8]];"uavrtt" setPiPEffect [0];

waitUntil { sleep 5; ((playerside == Independent) && (antenna inArea main) && (videoCamera inArea radio_zone))};
if ((playerside == Independent) && (antenna inArea main) && (videoCamera inArea radio_zone)) then 
{
		[videoCamera,"<t color='#FFAA00'>Turn on camera!</t>",
		"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa",
		"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa",
		"_this distance _target < 5",
		"_caller distance _target < 5",
		{[_target, "cccon",5] spawn CBA_fnc_globalSay3d;},
		{},
		{
			showUAVFeed true; bb1 setObjectTexture [0, "#(argb,512,512,1)r2t(uavrtt,1)"];
			[] execVM "scripts\voice.sqf";   // Sound
		},
		{},
		[],
		1,
		0,
		false,
		false] call BIS_fnc_holdActionAdd; 
};
};
};

 

Share this post


Link to post
Share on other sites

I don't believe you should be running it only on the dedicated server. camCreate at least is local so will need to run on everyone.

 

Your later checks for playerSide won't ever work because again it is only running on the dedicated server, for which it isn't a player.

Share this post


Link to post
Share on other sites
14 minutes ago, JasonO99 said:

I don't believe you should be running it only on the dedicated server. camCreate at list is local so will need to run on everyone.

 

 Your later checks for playerSide won't ever work because again it is only running on the dedicated server, for which it isn't a player.

I am doing a multiplayer mission where there are two sides, for the entourage I want to make a video broadcast using camCreate for the players. On a dedicated server, everything works for me, but there is no image on the billboard, how can I fix it?
i tried to initialize using isDedicated, !isDedicated, isServer, !isServer but it didn't work anywhere.

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
Sign in to follow this  

×