Jump to content
  • 0

Donator Trader City Access


ftshill

Question

So I have added / in the process of adding a donator trader city onto my epoch chernarus server.

 

Since I had gathered that creating a trader was very hard, instead i moved one of the boat traders, renamed it, added god mode to it, and am in the process of restocking it with different items.

 

This works fine, however, right now the only way i can see of restricting access to this trader is by setting the humanity needed to access it to something like 100 thousand (therefore preventing most normal players from having enough humanity to access it). I can then allocate donators with this humanity so they can access the trader. The issue with this now is that the donators would not have a choice of either hero or bandit. They would have to go with whichever is allocated to the trader.

 

Is it possible to create a different method of access restriction to the trader? E.g. only players with approved player UID's can access the trader? Or another method...

Any help setting this up would be awesome.

Link to comment
Share on other sites

Recommended Posts

  • 0

Call this in the trigger of your donator area.

_donatorList = ["123456789","123456789"];

if (!((getPlayerUID player)in _donatorList)) then {
    player setPos [x,y,z]; //coords where non donators are moved if entering the area
    cutText [format["%1 you are not allowed to enter this area!",name player],"PLAIN DOWN"];
};
Link to comment
Share on other sites

  • 0

In your mission.sqm you should have sensor for this donator area. In that sensor merge/edit it to look like this.

expActiv="NameOfYourSensorHere = [] execVM ""path\to\AboveScript.sqf"";";

Set coords for tp where you want to move them. That was just example. You could also kill them after couple warnings, for example.

Link to comment
Share on other sites

  • 0

You need to add a sensor to your mission.sqm

Just go in there and you will find the Sensor Class. You can copy one of the Trader city sensors over and add the code from Sukkaed for the expActiv (remove the building etc enabled or disabled...)

It is there at the beginning of your sensor you can edit the coords.. I am not home right now but maybe Sukkaed can just post one of his triggers to show you.. He is a friendly guy :P also make sure if you add a sensor to higher the items number at the start of the Sensors class ;)

Link to comment
Share on other sites

  • 0

Hey I am Friends with ftshill this is the code we have entered which has Coordinates

class Item5
{
position[]={2881.27,0.001,4484.38};
a=100;
b=100;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="zonedonator";
expCond="(player distance zonedonator) < 100;";
expActiv="TitleText[""Now Entering Donator Dealer"",""PLAIN DOWN""]; canbuild = false; inTraderCity = ""Donator Dealer"";";
expDesactiv="TitleText[""Now Leaving Donator Dealer"",""PLAIN DOWN""]; canbuild = true; inTraderCity = ""Any"";";
class Effects
{

                        };

 

What files do you need? 

Link to comment
Share on other sites

  • 0
class Item5
{
position[]={2881.27,0.001,4484.38};
a=100;
b=100;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="zonedonator";
expCond="(player distance zonedonator) < 100;";
expActiv="TitleText[""Now Entering Donator Dealer"",""PLAIN DOWN""]; canbuild = false; inTraderCity = ""Donator Dealer"";";
_donatorList = ["123456789","123456789"];

if (!((getPlayerUID player)in _donatorList)) then {
player setPos [x,y,z]; //coords where non donators are moved if entering the area
cutText [format["%1 you are not allowed to enter this area!",name player],"PLAIN DOWN"];
};
expDesactiv="TitleText[""Now Leaving Donator Dealer"",""PLAIN DOWN""]; canbuild = true; inTraderCity = ""Any"";";
class Effects
{
                        };

so would that be it? with of course where they get TPed to

 

 

 

ahhh I see this is wrong I think I know now

Link to comment
Share on other sites

  • 0

Changed the line to:

 

expActiv="TitleText[""Now Entering Donator Dealer"",""PLAIN DOWN""]; canbuild = false; inTraderCity = ""Donator Dealer"" = [] execVM ""Donator.sqf"";";

 

 

Then in the donator.sqf:

 

_donatorList = ["16466786"] 
 
if (!((getPlayerUID player)in _donatorList)) then {
    player setPos [2681.27,0.001,4484.38]; //coords where non donators are moved if entering the area
    cutText [format["%1 you are not allowed to enter this area!",name player],"PLAIN DOWN"];
};
 
Is this correct? Its still not working, I am sorry if I am annoying you, normally I don't find things like this so hard!
Link to comment
Share on other sites

  • 0

Finally got it working, however, i was wondering if i could set a hight on the zone, as the tp zone ejects people from their vehicles (Heli's), as soon as they pass over it (there is no hight limit), unless of course they have access to the area... I have added this: "sleep 10; player setPos [2906.3215, 4383.4087]; meaning that they will have ten seconds to leave the airspace before being ejected. This is not ideal though. I was hoping to have a hight limit of about 50meters above the trader so vehicles could still fly over. And if the person was to get Teleported, I would like the vehicle to be teleported with the player, therefore preventing the player being ejected and the vehicle crashing.

 

If you have any idea how I could achieve this please let me know! Thanks for all the help so far Sukkaed and Peipo118! B)

Link to comment
Share on other sites

  • 0

Thanks, works as intended, I had an issue with cars glitching through, however this was due to the cars being tped right next to the edge of the zone. I just change the tp location to further away from the trader, it worked a treat. All fixed and ready to go!

 

Thanks for all the help everyone! Thanks Sukkaed and Peipo118!!

Link to comment
Share on other sites

  • 0

Not really sure but try this.

_donatorList = ["123456789","123456789"];
_vehicle = vehicle player;

if (!((getPlayerUID player)in _donatorList)) then {
    _vehicle setPos [x,y,z];
    cutText [format["%1 you are not allowed to enter this area!",name player],"PLAIN DOWN"];
	if(_vehicle == player) then {
	_vehicle forceSpeed 0;
	sleep 2;
	_vehicle forceSpeed -1;
    };
};
Link to comment
Share on other sites

  • 0
if (!((getPlayerUID player)in _donatorList)) then {
    vehicle player setPos [2811.9241, 4367.1597];
    cutText [format["%1 This area is for Donators only!",name player],"PLAIN DOWN"];
if(_vehicle == player) then {
_v setVelocity[0, 0, 0];
    };
 
This is what i tried, i believe maybe i should have added a value for the velocity or maybe im looking in the wrong place....
Link to comment
Share on other sites

  • 0

Woops.. I had little typo there. Try this.

_donatorList = ["123456789","123456789"];
_vehicle = vehicle player;

if (!((getPlayerUID player)in _donatorList)) then {
    _vehicle setPos [2811.9241, 4367.1597];
    cutText [format["%1 This area is for Donators only!",name player],"PLAIN DOWN"];
	if(_vehicle != player) then {
	_vehicle forceSpeed 0;
	sleep 2;
	_vehicle forceSpeed -1;
    };
};
Link to comment
Share on other sites

  • 0

This is what i came up with:

 

if (!((getPlayerUID player)in _donatorList)) then {
    vehicle player setPos [2811.9241, 4367.1597];
    cutText [format["%1 This area is for Donators only!",name player],"PLAIN DOWN"];
if (vehicle player != player) then {
    vehicle player setVelocity[0, 0, 0];
   };
Link to comment
Share on other sites

  • 0

 

Woops.. I had little typo there. Try this.

_donatorList = ["123456789","123456789"];
_vehicle = vehicle player;

if (!((getPlayerUID player)in _donatorList)) then {
    _vehicle setPos [2811.9241, 4367.1597];
    cutText [format["%1 This area is for Donators only!",name player],"PLAIN DOWN"];
	if(_vehicle != player) then {
	_vehicle forceSpeed 0;
	sleep 2;
	_vehicle forceSpeed -1;
    };
};

Shouldn;t it be like this?

 

if (!((getPlayerUID player)in _donatorList)) then {
    (vehicle player) setPos [2811.9241, 4367.1597];
    cutText [format["%1 you are not allowed to enter this area!",name player],"PLAIN DOWN"];
    if((vehicle player) != player) then {
    (vehicle player) forceSpeed 0;
    sleep 2;
    (vehicle player) forceSpeed -1;
    };
};
 
whats the reason behind the _vehicles and not just vehicles
Link to comment
Share on other sites

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
  • Discord

×
×
  • Create New...