BeatenByBacon

Disable Flag Purchase at Office Trader

6 posts in this topic

Hello Guys.

I want to change that players on my server aren't able to purchase flags at the office trader. Like, if they go to the purchase option, they get a message when the press the purchase button 'Error! You don't have permissions to buy a flag. Please contact an admin.'

Does someone know how to change that? I have found the ExileClient_system_territory_network_purchaseTerritoryResponse.sqf file, where you can change the notifications, but for some reason, it does not work.

private["_responseCode"];
_responseCode = _this select 0;
switch (_responseCode) do
{
	case 1: 
	{
		["ErrorTitleAndText", ["Failed to purchase!", "You do not exist."]] call ExileClient_gui_toaster_addTemplateToast;
	};
	case 2:
	{
		["ErrorTitleAndText", ["Failed to purchase!", "You are too dead for this."]] call ExileClient_gui_toaster_addTemplateToast;
	};
	case 3: 
	{
		["ErrorTitleAndText", ["Failed to purchase!", "You do not have enough pop tabs."]] call ExileClient_gui_toaster_addTemplateToast;
	};
	case 0:
	{
		/*
		//[player, "Exile_Item_Flag", 1] call ExileClient_util_playerCargo_add;
		*/
		["SuccessTitleAndText", ["Error!", "You don't have the permission to buy a Flag. Please contact an Admin."]] call ExileClient_gui_toaster_addTemplateToast;
	};
};	
true

 

Share this post


Link to post
Share on other sites
I have not tested it but I guess you have to change the file ExileClient_gui_purchaseTerritoryDialog_show.sqf.
Because I found this in the exile_client config.bin:
    class territory {
                displayName = "Purchase Territory";
                position = "ohniste";
                radius = 3;
                priority = 6;
                onlyForPlayer = 1;
                condition = "true";
                statement = "this call ExileClient_gui_purchaseTerritoryDialog_show";
            };
 

Share this post


Link to post
Share on other sites
Advertisement

1. make a .sqf file (i.e. yourFile.sqf) that contains

  if (true) exitWith
  {
      ["ErrorTitleAndText", ["Attention!", "You don't have the permission to buy a Flag. Please contact an Admin."]] call ExileClient_gui_toaster_addTemplateToast;
  };


2. put that file in your mission .pbo

3. in your mission config.cpp insert in class CfgExileCustomCode

    ExileClient_gui_purchaseTerritoryDialog_show = "yourFile.sqf";

 

 

 

Share this post


Link to post
Share on other sites

Could just take out the office trader .. no trader no purchase .. put a billboard there .. see admin for territory flag , office trader is out of the office.
But I cant imagine that would go over well .. and will cause you to prob have an empty server lol in either case .. why u would want to remove the ability to get a flag is beyond me

Edited by Chainsaw Squirrel
  • Like 1

Share this post


Link to post
Share on other sites

my plan is also trying take flag away from office in namalsk map so people cant buy it from office. 
And why im want that, reason is that players need craft flag kit, most players like that idea.

 

Edited by roadsoldier

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.