Home   Help Search Login Register  

Author Topic: Lobby options to change variable.  (Read 1726 times)

0 Members and 1 Guest are viewing this topic.

Offline Grimfist

  • Members
  • *
    • Armaholic
Lobby options to change variable.
« on: 07 Feb 2009, 14:59:52 »
Hi, im new here and have a question (sorry if in wrong place or anything)

you know in the lobby on some missions you can set the time and respawn etc?
well i want the admin to be able to choose if a sandstorm is on or not.


Code: [Select]
; ***************************************************
; Sand Storm Script 1.0
; by Toadeater (toadeater@wolfenet.com)
; ***************************************************
;
; Usage: Activate from the player's init line, or a script:
; [playername] exec "duster.sqs"
;
; If you want to use this script in a cutscene, attach it to a camera, otherwise
; the "sand" won't be seen from the camera's point of view.
; E.g. [camera1] exec "duster.sqs"
;
; Turn off by setting the "dustoff" variable to true via a trigger or script, etc.
; dustoff = true

how do i make the dustoff variable change by selecting it in the lobby?

maybee something like this?

Code: [Select]
titleParam1="Play Intro/Outro";
valuesParam1[]={1,2};
defvalueParam1=1;
textsParam1[]={"Play","Skip"};

TY in advance, grim.

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Lobby options to change variable.
« Reply #1 on: 07 Feb 2009, 16:27:36 »
Code: [Select]
titleParam1="Dust On/Off";
valuesParam1[]={1,2};
defvalueParam1=1;
textsParam1[]={"Dust","NoDust"};


Then in the init.sqf add:

Code: [Select]
if (Param1 == 1) then {dustoff =true} else {dustoff = false};

Something like that.

btw we don't allow images in the signature here.
Xbox Rocks

Offline Grimfist

  • Members
  • *
    • Armaholic
Re: Lobby options to change variable.
« Reply #2 on: 07 Feb 2009, 16:56:26 »
ok thanks, ill try this now.

WOW - it worked ty very much hoz

i just had to swap the words around as on was off and off was on lol.

ty.
« Last Edit: 07 Feb 2009, 17:51:02 by Grimfist »