Jump to content

Need help: setWeather


Vinspire

Recommended Posts

Hello guys, I'm wondering if you have any great ideas how to set the weather different with the

setWeather 

code? does it work?

(with a command)

E.g:

--shitcode123 
  
function csw() 
local time = setWeather 
setWeather () 
outPutChatbox ('New weather set to  '..weather.., source) 
addCommandHandler("csw", csw) 

Something like this? random shit example

Thanks!

Edited by Guest
Link to comment

That worked, the only problem is that (9) is only foggy weather, so I tried to do something like this to get all possible weathers ~~

addCommandHandler('csw', 
function ( ) 
  setWeather(0) 
  setWeather(1) 
  setWeather(2) 
  setWeather(3) 
  setWeather(4) 
  setWeather(5) 
  setWeather(6) 
  setWeather(7) 
  setWeather(8) 
  setWeather(9)  
  local Weather = getWeather () 
end 
) 

^ didn't work.

Link to comment

Tried to fix how to set time with a command too, (goes under the same category)

Doesn't work.

addEventHandler( 'onClientRender', getRootElement( ), 
function (csettime) 
    local hour, minutes = getTime() 
    setTime( 1, 0 ) 
end 
) 
addCommandHandler('cst', csettime) 

Link to comment

Try This ,

addCommandHandler('csw', 
 function ( ) 
 setWeather(math.random (0, 9 ) ) 
  local Weather = getWeather () 
  outputChatBox("The weather is currently: "..Weather, source) 
  end 
  ) 
   
addCommandHandler('time',  
function  ( ) 
   setTime ( 1, 0 ) 
    local time = getRealTime () 
    local hours = time.hour 
    local minutes = time.minute 
    outputChatBox( 'Local Time : '..hours..':'..minutes , source) 
     end 
    ) 

Link to comment
Try This ,
addCommandHandler('csw', 
 function ( ) 
 setWeather(math.random (0, 9 ) ) 
  local Weather = getWeather () 
  outputChatBox("The weather is currently: "..Weather, source) 
  end 
  ) 
   
addCommandHandler('time',  
function  ( ) 
   setTime ( 1, 0 ) 
    local time = getRealTime () 
    local hours = time.hour 
    local minutes = time.minute 
    outputChatBox( 'Local Time : '..hours..':'..minutes , source) 
     end 
    ) 

The weather works partly, could you make it not random weathers? if I do e.g: /csw 1 " then it's sun on my screen?

The /cst is already stock in the game when you're doing /time, but my point was making it e.g: /cst 11 43 then it get's the night color on the screen, if I do /cst 06 00 then it gets the light color because it's morning ingame.

Could you try to make it like that?:)

Thanks!

Link to comment

well , You Colud Use , tabel , but i dont know how iam not Good in Tables ,

Now iam going to let you try , trust me go to addCommandHandler on wiki and the setTime Functions on wiki , understand them then you don't need any body help to make Simple Scripts like this ,

Go Try it ,

Link to comment
well , You Colud Use , tabel , but i dont know how iam not Good in Tables ,

Now iam going to let you try , trust me go to addCommandHandler on wiki and the setTime Functions on wiki , understand them then you don't need any body help to make Simple Scripts like this ,

Go Try it ,

Thanks mate :) Will do.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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