Jump to content
Sign in to follow this  
Da_Hollander

Assigning players with extra rights on a mission script

Recommended Posts

Hello,

 

Unfortunately I am still a beginner when it comes to arma scripting and I could use some help (e.g. for terminology)! If I know what to google for I can figure out a lot by myself  ;) 

 

I am trying to make a mission script and I would like it to give certain players certain rights. For example on mission start-up there should be a configuration menu that pops up so mission parameters can be set. But this menu should only pop-up to a specific person or perhaps specific player-slot. 

 

This very same person should be allowed to have certain perks later on the mission as well (for example; requesting new missions without everyone being able to do so).

 

I hope I made clear what I am trying to achieve here. If someone could help me further with terminology or perhaps a link to a tutorial that explains it, that would be great.

 

Thank you in advance.

 

-Da_Hollander

Share this post


Link to post
Share on other sites

on mission start-up there should be a configuration menu that pops up so mission parameters can be set. But this menu should only pop-up to a specific person or perhaps specific player-slot

Hello, are you familiar with the Arma multiplayer lobby parameters menu ? It is available to multiplayer session administrator only. Parameters menu can be configured in description.ext

class Params
{
	class Daytime
	{
		title = "Time of Day";
		values[] = {6,18};
		texts[] = {"6 AM","6 PM"};
		default = 18;
		function = "BIS_fnc_paramDaytime";
	};
};

This very same person should be allowed to have certain perks later on the mission as well (for example; requesting new missions without everyone being able to do so)

Session admin is able to request new mission using #missions command.

Edited by Nikander

Share this post


Link to post
Share on other sites

Hello, are you familiar with the Arma multiplayer lobby parameters menu ? It is available to multiplayer session administrator only. Parameters menu can be configured in description.ext

class Params
{
	class Daytime
	{
		title = "Time of Day";
		values[] = {6,18};
		texts[] = {"6 AM","6 PM"};
		default = 18;
		function = "BIS_fnc_paramDaytime";
	};
};

Session admin is able to request new mission using #missions command.

Thank you for your responce.

 

I did not mean the lobby parameters but mission related options/scripts that pop-up when you've started the mission.

 

For example how many mission zones you want and if you want to place them randomly or manually.

 

It is that a specific person should get a box like that because if everyone would get that option then there is no point of selecting the amount of zones. Only one person should get this option at mission launch.

 

Hope I'm more clear now :)

Share this post


Link to post
Share on other sites

To support my example even more: I think this should launch at missionStart.sqf

_allPlayers = [];
if (isMultiplayer) then {
	waitUntil {count playableUnits > 0};
		{
		if (isPlayer _x) then {
			_allPlayers pushBack _x; };
		} forEach playableUnits;
};

Special_Snowflake = _allPlayers call bis_fnc_selectRandom;

publicVariable "Special_Snowflake";

And later on I should probably make a script that checks if a player is Special_Snowflake and if not he cant acces a certain thing?

 

But in the case of the presented script, it is randomly chosen.. But It should not be randomly chosen but a specific player (maybe through his playerID) or a certain lobby slot? So unit assigned?

Share this post


Link to post
Share on other sites

You could just use getPlayerUID if you want to lock it to a specific player, no matter which slot he's using.

To lock it to a specific slot/unit use a simple check:

if (player isEqualTo UnitVarName) then {bleh};

Cheers

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  

×