Jump to content
Dantspa

How can i config onpause menu "save game " button

Recommended Posts

 

I have rental dedi arma 3 server and i have INIDBI2 for save system on it. Right now there is a save game button in the game screen, but i want to get it on the pause menu save game button, the button is grey now. Button i have right now is scripted like this: 

"initplayerlocal.sqf"

 

Player addAction ["<t color=`#38BAFF`>Save Game</t>", {[] call UN_savedata;}];

 

How can i script it in the onpause menu "save game" button?

 

I find this link, but i don`t get it work

 

 

Share this post


Link to post
Share on other sites

Its not possible to use armas own save game, its not working. Database working fine in this server , but the save button i have right now It's a little bit annoying. Every time you leave inventory save game text comes to the middle of the screen and you need to spin the mouse wheel and press the right mouse button to get it off. That's why I'd like it to the pause menu save button.

Share this post


Link to post
Share on other sites

Using the save button does not work if it is greyed out. It is best to script the continue button in multiplayer.

 

This example will change the Continue button and make it blue, as well as run your function when it is clicked.

 

h = [] spawn {
	while {true} do {
		waitUntil {! isNull (findDisplay 49)};
		_btn = ((findDisplay 49) displayCtrl 2) ctrlSetText "Save progress.";
		_btnclr = ((findDisplay 49) displayCtrl 2) ctrlSetBackgroundColor [0, 0, 0.9, 1];
		_CEH = ((findDisplay 49) displayCtrl 2) ctrlAddEventHandler ["MouseButtonDown",{(findDisplay 49) closeDisplay 0; [] call UN_savedata;}];
		waitUntil {isNull (findDisplay 49)};
	};
};

This should do what you want. I used this for my own mission to load a dialog of options when it is clicked. Put this in the initPlayerLocal.sqf and give it a shot.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks Jakeplissken, You're the best!! Now it's just what I wanted and it works great. I've been fighting this for almost two weeks. I'm soooo happy it works now😁

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

×