Jump to content

Recommended Posts

Posted

Hello all capable scripters, I was wondering if anyone could help me with a small script. It is the Freeside light script, basicaly OI dont like the times that it goes for, it starts at about 8 and finishes at about 11pm, so I wanted to change it to 8pm-8am. The scrip basicly governs when the lights for the street light turn on and off, the following is the script:

 

Scn FreesideLightsScript

 

Float fTime

Short bLightOn

 

Begin OnLoad

 

Set fTime to GetCurrentTime

 

If fTime > 20 && fTime < 23.20

Set bLightOn to 0

Elseif ( fTime > 23.20 || fTime < 20 )

Set bLightOn to 1

Endif

 

End

 

 

 

Begin GameMode

 

 

Can you help?

Posted

Scn FreesideLightsScript

Float fTime
Short bLightOn

Begin OnLoad

 Set fTime to GetCurrentTime

 If fTime > 20 && fTime < 23.20
   Set bLightOn to 0 
 Elseif ( fTime > 23.20 || fTime < 20 )
   Set bLightOn to 1
 Endif 

End


Begin GameMode

 

Unless you only copied a part of the script, you shouldn't have an incomplete GameMode block. You'll want to look at the GetCurrentTime function. Follow the CS redirect link.. the function is probably the same in the Construction Set as it is in the Geck.

8:00 pm = 20.

8:00 am = 8.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...