Jump to content
Sign in to follow this  
Fiddi

[SOLVED] Get the activator (player) of a GUI button.

Recommended Posts

Hey, I have a little question, how would I get who pressed a button in a custom GUI Menu? I need to forward the activating player to a script, this is the button in question.

class MTHI_GUI_5: SUPER_BUTTON {
	idc = -2;
	text = "STRATEGIC MAP";
	x = 0.45 * safezoneW + safezoneX;
	y = 0.525 * safezoneH + safezoneY;
	w = 0.1 * safezoneW;
	h = 0.05 * safezoneH;
	sizeEx = "0.029 / (getResolution select 5)";
	action = "closeDialog 0; [/*PLAYERHERE*/] execVM 'SideOps\SideOpsSelectMission.sqf'";
};

The GUI Menu is called by an action if that helps.

Share this post


Link to post
Share on other sites

Even in multiplayer?

Share this post


Link to post
Share on other sites

Yes. It is a local command. On a dedicated server it will return objNull. But it doesn't have a interface so the GUI is useless there anyway

Share this post


Link to post
Share on other sites

Oh, so it was that easy... Thanks alot for the help!

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  

×