Jump to content
Sign in to follow this  
camdev

Disable 3rd on Foot?

Recommended Posts

So I was wondering if anyone knew a script to disable 3rd while on foot, while still making it available in vehicles. Also if I could have a brief explanation on how to make it work it would be appreciated. Thanks

Share this post


Link to post
Share on other sites

This should work, I just tested it.

Paste this in your init.sqf:

if !(isServer) then 
{
if (player != player) then 
{ waitUntil { player == player; }; };
[] execVM "disable3rdPerson.sqf";
};

Make a new sqf file and name it "disable3rdPerson.sqf"

Paste what's below into it, and save it to your mission folder.

if (difficultyEnabled "3rdPersonView") then //Checks to see if third person is enabled
{ 
while {true} do 
{
	if (cameraView == "External") then
	{
		if ((vehicle player) == player) then
		{
			player switchCamera "Internal";
			player commandChat "Third Person on foot has been disabled by the mission maker!";
		};
	};
	sleep 0.1;
};
};

Be advised, this Will NOT Work in the Editor, only on a server.

Source code

-

Use this next time

Edited by bob100101
Minor edits

Share this post


Link to post
Share on other sites
This should work, I just tested it.

Paste this in your init.sqf:

if !(isServer) then 
{
if (player != player) then 
{ waitUntil { player == player; }; };
[] execVM "disable3rdPerson.sqf";
};

Make a new sqf file and name it "disable3rdPerson.sqf"

Paste what's below into it, and save it to your mission folder.

if (difficultyEnabled "3rdPersonView") then //Checks to see if third person is enabled
{ 
while {true} do 
{
	if (cameraView == "External") then
	{
		if ((vehicle player) == player) then
		{
			player switchCamera "Internal";
			player commandChat "Third Person on foot has been disabled by the mission maker!";
		};
	};
	sleep 0.1;
};
};

Be advised, this Will NOT Work in the Editor, only on a server.

Source code

-

Use this next time

So will all of this still leave 3rd person available if driving?

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  

×