Jump to content
Sign in to follow this  
inastia

execute script on clients

Recommended Posts

Hello,

im really new in Arma2 scripting, so i need help with a script.

I wanna pack this script below in the server.pbo, but its only executed on server, not on clients.

myScript.sqf

					_Message1 = "Hello:";
				_Message1sub = ["World"];
				_Time = 20; 																					// how long message will be on screen

				_HeaderSize = "0.5";																		// header size
				_HeaderColor = "#f2cb0b";																// color FF0000 = red
				_HeaderAlign = "right";																		// text alignment

				_SubSize = "0.4";																				// subtext size
				_SubColor = "#FFFFFF";																	// color FFFFFF = white
				_SubAlign = "right";																			// text alignment
{
	sleep 0.5;
	_memberFunction = _x select 0;
	_membersub = _x select 1;
	_finalText = format ["<t size='%2' color='%3' align='%4'>%1<br /></t><t size='%5' color='%6' align='%7'>", _memberFunction,_HeaderSize,_HeaderColor,_HeaderAlign,_SubSize,_SubColor,_SubAlign];
	{_finalText = _finalText + format ["%1<br />", _x]} forEach _membersub;
	_finalText = _finalText + "</t>";
	_Time + (((count _membersub) - 1) * 0.5);
			[
					_finalText,
					[safezoneX + safezoneW - 0.8,0.50], 
					[safezoneY + safezoneH - 0.8,0.7], 
					_Time,
					0.5
			] spawn BIS_fnc_dynamicText;
			sleep (_Time);
} forEach [
	[_Message1, _Message1sub]
];

If i put this into the mission.pbo i can execute this with [nil, nil, rEXECVM, "myScript.sqf"] call RE;

What i have to do, to execute this on clients if its in server.pbo?

Sry for my bad english.

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  

×