Jump to content
BikerJoe

Player/spectator... is it possible?

Recommended Posts

Hello everyone,

 

I don't know if its possible but is there a script of anything to  allow a player become a spectator?

 

As in a script that allows a player to switch back and forth from spectator mode without being zeus?

 

thanks

Joe

Share this post


Link to post
Share on other sites

Press ESC, and there is literally a button called SPECTATOR.

Press ESC and click it again to switch back to Player.

Share this post


Link to post
Share on other sites
4 minutes ago, Von Quest said:

Press ESC, and there is literally a button called SPECTATOR.

Press ESC and click it again to switch back to Player.

 

That's only if the mission is setup to allow all players access to the debug menu, which is a terrible idea. Less so if it's setup to allow access to admin/host, but then there can only be one of those (RCON aside). If respawn is set up for spectator, you need to be dead. OP could be a little clearer, but it seems like they are asking for live, toggle-able spectator access for all players.

Share this post


Link to post
Share on other sites

Hello there @BikerJoe !

 

//	press number 5 
//	https://community.bistudio.com/wiki/DIK_KeyCodes

[]spawn{
	waitUntil {!isNull (findDisplay 46)};
	disableSerialization;
    (findDisplay 46) displayAddEventHandler ["KeyDown", {
	params ["_displayorcontrol", "_key", "_shift", "_ctrl", "_alt"];
		if((_key isEqualto 0x06))exitWith {["Initialize", [player]] call BIS_fnc_EGSpectator;}
	}];
};

//	or 
//player addAction ["Spectator", {["Initialize", [player]] call BIS_fnc_EGSpectator;}];


// press esc to exit

[] spawn {
	while{true}do{
		waitUntil {!isNull findDisplay 49};
		["Terminate"] call BIS_fnc_EGSpectator;
		uisleep 3;
	};
};

 

check also this :

 

 

  • Like 5

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

×