ka0s

Blacklist area for building.

6 posts in this topic

Hi. 

So I figured that I would run some events on my server once in a while, and therefore I would build a custom event area, however in the event area I do not want anybody to be able to build there, how would I do that? 

The area I'm talking about below: 

RestrictedBuildZone.thumb.jpg.c171c35c8c

Share this post


Link to post
Share on other sites
Advertisement

Something like this should do

Altering ExileClient_object_item_construct.sqf

_radius = X; //amount of meters from center nonBuildZone
if ((player distance [Y, Z, 0]) < _radius) then { throw "Error, Error, peep peep"; };

Then create a custom error at the botom of the file.

  • Like 1

Share this post


Link to post
Share on other sites
On 10/7/2015 at 2:55 PM, Santa said:

Something like this should do

Altering ExileClient_object_item_construct.sqf

_radius = X; //amount of meters from center nonBuildZone
if ((player distance [Y, Z, 0]) < _radius) then { throw "Error, Error, peep peep"; };

Then create a custom error at the botom of the file.

I am still really new to scripting and the file confuses me a lot. Is it possible to lay out the steps to do this keeping in mind that I know very little and am learning by example? Thanks in advance :)

Share this post


Link to post
Share on other sites

@Santa I got this kind of working. I can prohibit people from building in one defined area but I am stuck on the error message. Getting Invalid cfgnotification error. How do I define a custom error message. Also, how would I go about throwing multiple coordinates into an array?

 

Edit: got arrays working but still stuck on working notification messages. I cant wrap my head around it or see any examples in the file.

 

Edit 2: Got notifications working but they are white. Still trying to make them pop in ad red notifications. Here is where I edited the file in case anyone else has issues like me and doesn't want to spend hours trying to figure something like this out. 

Spoiler

    catch 
    {
        if(_exception isEqualTo "ConstructionAbortedInformation")then{
            [_exception,"Restricted Area"] call ExileClient_gui_notification_event_addNotification;
        }else{
            [_exception] call ExileClient_gui_notification_event_addNotification;
        };
    };
 

 

Edited by Omen

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.