Jump to content
Sign in to follow this  
Theassassinzz

Whitelisted Area

Recommended Posts

Hello, so I am trying to get a white listed area to work on my server, I have this so far

playerList = [
	"00000000000000000"/* Assassin */,
	"00000000000000000"/* Kadaire */,
	"00000000000000000"/* Halvix */,
	"00000000000000000"/* Elikat */,
	"00000000000000000"/* BigSky */,
	"00000000000000000"/* Snakebite */,
	"00000000000000000"/* Grunt */,
	"00000000000000000"/* RageOnJack3D */,
	"00000000000000000"/* God Dammit */
];

_uid = getPlayerUID player;

{ 

	if ((vehicle player) == _x && ((getPos _x) select 2 < 1) && (!(_uid in playerList))) then {

		{
			// Let player know this is members area and they are being removed
			hintC "This is a Members only area!";
			// Teleport them
			_x setPos (getMarkerPos "respawn_west");
		} forEach (crew _x);
	
	// Teleport vehicle to spawn
	_x setPos (getMarkerPos "vehicle_teleport");
	};
	
	// Teleports single person
	if (player == _x && (!(_uid in playerList))) then {
		// Let player know this is members area and they are being removed
		hintC "This is a Members only area!";
		// Teleport them
		_x setPos (getMarkerPos "respawn_west");
	};
} forEach _this;
	

That is in "lock.sqf"

null = thisList execVM "Assassin\map\lock.sqf";

That is in the On Act in the trigger set to BLUFOR present repeatable.

I am stumped as to why this isn't working. Also doesn't help that I am new to scripting too. 

Thanks in advance for any help!

Share this post


Link to post
Share on other sites

Try launch game with -showScriptErrors parameter and trace state of script execution/variables using systemChat and diag_log commands:

systemChat str _this;
systemChat format ["myvariable = %1", myvariable];

 

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, serena said:

Try launch game with -showScriptErrors parameter and trace state of script execution/variables using systemChat and diag_log commands:


systemChat str _this;
systemChat format ["myvariable = %1", myvariable];

 

Thank you for the help! 

Ran this, made me realize that I hadn't messed up, just had defined the variable playerList in another script. And coincidentally the 2 players I had test it where on that list haha ':D

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×