Jump to content
Guest

gui_massage

Recommended Posts

Guest
{
   _result = ["Are you sure you want sky diving?", "Confirm", true, true] call BIS_fnc_guiMessage;
   
removeBackpack player; player addBackpack "B_Parachute"; player setPos [getPos player select 0, getPos player select 1, (getPos player select 2) +200];

}

hey i would like to make a skydive script when the player enters a trigger he should get ask if he wants to skye dive and than if he accapt the script should be played, but i dont manage to get it runnint :( someone knwo why its not working ?

Share this post


Link to post
Share on other sites

Right so these are the params that BIS_fnc_guiMessage accept:
message, header, position, isCancel, parent, pause
 and the respective types of these params are:
String (or structured text), String (or structured text), array, boolean or array, Display, boolean.

I'm guessing that you want the following:
message => "Are you sure you want sky diving?"
header => "Confirm"
isCancel => true
pause =>  true

The script doesn't know that, it'll think that you want 'true' for the position.  If you don't want to specify a parameter don't just skip it, use 'nil' as the value for the param.

Share this post


Link to post
Share on other sites
Guest
40 minutes ago, stanhope said:

Right so these are the params that BIS_fnc_guiMessage accept:
message, header, position, isCancel, parent, pause
 and the respective types of these params are:
String (or structured text), String (or structured text), array, boolean or array, Display, boolean.

I'm guessing that you want the following:
message => "Are you sure you want sky diving?"
header => "Confirm"
isCancel => true
pause =>  true

The script doesn't know that, it'll think that you want 'true' for the position.  If you don't want to specify a parameter don't just skip it, use 'nil' as the value for the param.

 

sry i tred it but i didnt got it :( can you make it for me :( or is it wo much work ?

Share this post


Link to post
Share on other sites

Ok, I didn't check the alternative syntax, I should probably have done that.
What exactly isn't working?
 

Share this post


Link to post
Share on other sites
Guest
Just now, stanhope said:

Ok, I didn't check the alternative syntax, I should probably have done that.
What exactly isn't working?
 

 

I dont know what to change to get this working so i tried to rewrite it but i have no clue ? can you change the stuff which should be changed , so i understand it, please

Share this post


Link to post
Share on other sites

What exactly is it doing or not doing that you don't want it to be doing?

Share this post


Link to post
Share on other sites
Guest
4 minutes ago, stanhope said:

What exactly is it doing or not doing that you don't want it to be doing?

 

evertime i put the cod inside the trigger

{
   _result = ["Are you sure you want sky diving?", "Confirm", true, true] call BIS_fnc_guiMessage;
   
removeBackpack player; player addBackpack "B_Parachute"; player setPos [getPos player select 0, getPos player select 1, (getPos player select 2) +200];

}

i get the Error that "on Activation: type code, excepted Nothing" and i am not able to fix it and have no clue :(

Share this post


Link to post
Share on other sites

Put this in the trigger (no guarantees, i didn't test it):

 

 _result = ["Are you sure you want sky diving?", "Confirm", true, true] call BIS_fnc_guiMessage;
if (_result) then {
	removeBackpack player; 
  	player addBackpack "B_Parachute"; 
  	player setPos [getPos player select 0, getPos player select 1, (getPos player select 2) +200];
}

 

Share this post


Link to post
Share on other sites
Guest

Thanks your your helipn, but it wasn´t working the error was "On activation: Local Variable in global space" idk :S

Share this post


Link to post
Share on other sites
Guest
11 minutes ago, stanhope said:

Put this in the trigger (no guarantees, i didn't test it):

 


 _result = ["Are you sure you want sky diving?", "Confirm", true, true] call BIS_fnc_guiMessage;
if (_result) then {
	removeBackpack player; 
  	player addBackpack "B_Parachute"; 
  	player setPos [getPos player select 0, getPos player select 1, (getPos player select 2) +200];
}

 

Thanks your your helipn, but it wasn´t working the error was "On activation: Local Variable in global space" idk :S

Share this post


Link to post
Share on other sites
25 minutes ago, Kleine Bea said:

Thanks your your helipn, but it wasn´t working the error was "On activation: Local Variable in global space" idk :S

 

Turn it into a global variable then.

That's basically word for word what the error message says.

 

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

×