Vinspire Posted June 12, 2014 Posted June 12, 2014 (edited) 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 June 12, 2014 by Guest
Max+ Posted June 12, 2014 Posted June 12, 2014 Try this , addCommandHandler('csw', function ( ) setWeather(9) local Weather = getWeather () outputChatBox('Weather has been set to ..Weather.. ' ) end )
Vinspire Posted June 12, 2014 Author Posted June 12, 2014 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.
Vinspire Posted June 12, 2014 Author Posted June 12, 2014 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)
Max+ Posted June 12, 2014 Posted June 12, 2014 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 )
Vinspire Posted June 12, 2014 Author Posted June 12, 2014 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!
Max+ Posted June 12, 2014 Posted June 12, 2014 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 ,
Vinspire Posted June 12, 2014 Author Posted June 12, 2014 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now