Aggro

[Help] Disable 3rd Person view when entering cities

22 posts in this topic

I would like help in disabling 3rd person when players enter built up areas or if they are near objects whichever is easier.

I don't want to disable it completely as I know some players like to see their skin or be in 3rd person when driving or flying.

I feel built up areas is where 3rd person abuse is most disruptive , I would like to be able to disable it when players go inside cites or similar to how safe zone works, players get exile notification pop up to say 3rd person is disabled when entering those radius zones set up by admins set around different locations on custom maps.

 

 

Share this post


Link to post
Share on other sites

Alternatively It could disable 3rd person at all time, only allow players to enable it or force 3rd person when:

  • They enter safe zones.
  • They enter vehicles.
  • press 0 to run.

 

Share this post


Link to post
Share on other sites
Advertisement
// GR8
waitUntil {alive player;};
if (difficultyEnabled "3rdPersonView") then {
	while {true} do {
		waitUntil {cameraView == "EXTERNAL" || cameraView == "GROUP"};
		_locationTypes = 
		[
			"ExileTerritory",
			"NameCityCapital",		
			"NameCity",				
			"NameVillage",			
			"NameLocal",			
		];
		_locations = nearestLocations [player, _locationTypes, 100];
		if !((count _locations) isEqualTo 0) then
		{
			player switchCamera "INTERNAL";
                             ["Whoops",["3rd Person Disabled"]] call ExileClient_gui_notification_event_addNotification;
		};
		uiSleep 1;
	};
};

Here you go, make something for you very quit, Not tested but you get the idea. If a player goes near a city or a village or a territory, he will be switched to first person.

Edited by GR8
  • Like 1

Share this post


Link to post
Share on other sites
// GR8
waitUntil {alive player;};
if (difficultyEnabled "3rdPersonView") then {
	while {true} do {
		waitUntil {cameraView == "EXTERNAL" || cameraView == "GROUP"};
		_locationTypes = 
		[
			"ExileTerritory",
			"NameCityCapital",		
			"NameCity",				
			"NameVillage",			
			"NameLocal",			
		];
		_locations = nearestLocations [player, _locationTypes, 100];
		if !((count _locations) isEqualTo 0) then
		{
			player switchCamera "INTERNAL";
                             ["Whoops",["3rd Person Disabled"]] call ExileClient_gui_notification_event_addNotification;
		};
		uiSleep 1;
	};
};

Here you go, make something for you very quit, Not tested but you get the idea. If a player goes near a city or a village or a territory, he will be switched to first person.

GR8 thanks for your quick reply, I will try it tonight and let you know.

Do I add this in mission.pbo as sqf and call it from init?

are you contactable on steam or ts?

also do you think my second suggestion/ second post would work better? I think that might be a cleaner way to do it?

Edited by Aggro

Share this post


Link to post
Share on other sites

GR8 thanks for your quick reply, I will try it tonight and let you know.

Do I add this in mission.pbo as sqf and call it from init?

are you contactable on steam or ts?

also do you think my second suggestion/ second post would work better? I think that might be a cleaner way to do it?

Yes, You use the init to call it. Anything is possible. Create something i will let you know if that works. You can find me on Steam as GR8

Edited by GR8

Share this post


Link to post
Share on other sites

Yes, You use the init to call it. Anything is possible. Create something i will let you know if that works.

How would I write a switch case to check if player is entering safe zone, activating or deactivating 0 to run or entering vehicles?

I can disable 3rd person (hardcoded) and do check for the above if true enable 3rd person.

 

Share this post


Link to post
Share on other sites

How would I write a switch case to check if player is entering safe zone, activating or deactivating 0 to run or entering vehicles?

I can disable 3rd person (hardcoded) and do check for the above if true enable 3rd person.

 

You will need to use a while loop with checks like "In Safezone" or "Auto Running" or "vehicles". I am not sure how to detect auto running, but checking safezones and vehicles should be pretty easy.

Share this post


Link to post
Share on other sites

Check for Safezones:

ExilePlayerInSafezone

Check for Auto Running:

ExileClientIsAutoRunning

Check for vehicles:

vehicle player isEqualTo player

 

Share this post


Link to post
Share on other sites

Check for Safezones:

ExilePlayerInSafezone

Check for Auto Running:

ExileClientIsAutoRunning

Check for vehicles:

vehicle player isEqualTo player

 

Trying this and my screen is spammed with "3rd Person Disabled" it looks like it disabled 3rd person however getting in vehicle or pressing 0 to run is not giving me the option or putting me in 3rd person at all, the server is taking a big performance hit (lag) displaying those messages

 

// GR8
waitUntil {alive player;};
if (difficultyEnabled "3rdPersonView") then {
    while {true} do {
        waitUntil {cameraView == "EXTERNAL" || cameraView == "GROUP" || ExilePlayerInSafezone || ExileClientIsAutoRunning || (vehicle player isEqualTo player) };
            player switchCamera "INTERNAL";
            ["Whoops",["3rd Person Disabled"]] call ExileClient_gui_notification_event_addNotification;
        };
        uiSleep 1;
    };
};

Share this post


Link to post
Share on other sites

Trying this and my screen is spammed with "3rd Person Disabled" it looks like it disabled 3rd person however getting in vehicle or pressing 0 to run is not giving me the option or putting me in 3rd person at all, the server is taking a big performance hit (lag) displaying those messages

Do the messages stop when you get in a vehicle ?

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.