BeatenByBacon

Adding a Trigger to a PvP-Zone

3 posts in this topic

Hello Exile-Community.

I want to create a PvE-Exile server. Right now everything is working just fine. Now I created a PvP-Zone so players can also have some PvP action on the server as well. The last thing i want to add is, that if you move into the zone, you get a notification like "WARNING! You've entered the PvP-Zone". Unfortunately I dont know how to do that. I have searched for a solution, but i couldnt find any.

On old topics you had to add a Sensor into your mission.sqm, but it doesnt look like it works anymore. Can someone help me to solve this problem?

Sincerely 

BeatenByBacon

Share this post


Link to post
Share on other sites

Wrong section, please look up next time - this topic belongs in here:

http://exile.majormittens.co.uk/forum/181-programming/

Anyways, in initPlayerLocal.sqf:

[] execVM "pvpzone.sqf";

Create pvpzone.sqf in missionfile:

/*
pvpzone.sqf by WURSTKETTE
*/

private ["_pvp","_obj"];

//Place an object (Example: Flag_Larkin_F) thru editor IN THE MIDDLE of pvp zone, make sure it's an unique object on the map. I also suggest creating a mapmarker for pvpzone in mission.sqm

_obj = "Flag_Larkin_F"; 

if (!isDedicated) then { 

  		while {true} do {
			
				_pvp = count nearestObjects [player, [_obj], 500]; //500 = radius of pvp zone	
			
				if (_pvp > 0) exitWith {
					
				["ENTERING PVP ZONE"] spawn ExileClient_gui_baguette_show;
				["ErrorTitleAndText", ["PVP ZONE!", "You just entered the area of outlaws. Killing each other in this zone is allowed!"]] call ExileClient_gui_toaster_addTemplateToast;

			};
		};
	
};

 

 

e90XQoW.png

Edited by WURSTKETTE

Share this post


Link to post
Share on other sites

I'm trying to create PvP Zone myself , been changing safezones code with combination of AntiPVP script posted on forums.
So far no luck... Can you help me get it working , @BeatenByBacon ? 

Edited by Chernaruski

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.