Miika Posted August 8, 2014 Posted August 8, 2014 I make autoWeather mod. But it not working for good. My script is: -- Copyright SuomiGTA -- -- Tekijä: Miika822 -- -- Scriptin jälleenmyyminen EHDOTTOMASTI KIELLETTY! -- -- Ilmoitukset -- function onStart() outputChatBox("Miikan sää script v 1.0 on käynnistetty onnistuneesti.", source, 255, 0, 0) setTimer ( changeWeatherSunny, 1000, 1 ) end addEventHandler("onResourceStart", getRootElement(), onStart) function onJoin() outputChatBox("Sään tarjoaa Miikan sää scripti.") end addEventHandler("onPlayerJoin", getRootElement(), onJoin) -- Scripti alkaa kunnolla -- function changeWeatherSunny() setWeather ( 1 ) outputChatBox("Sää vaihdettiin aurinkoiseksi säämodin johdosta!") setTimer ( changeWeatherRainy, 300000, 1 ) end function changeWeatherRainy() setWeather ( 8 ) outputChatBox("Sää vaihdettiin myrskyksi säämodin johdosta!") setTimer ( changeWeatherSandstrom, 300000, 1 ) end function changeWeatherSandstrom() setWeather ( 19 ) outputChatBox("DARUDE SANDSTORM! -Säämodi") setTimer ( changeWeatherPink, 600000, 1 ) end function changeWeatherPink() setWeather ( 118 ) outputChatBox("Pinkki taivas ja kristalli vesi!") setTimer ( changeWeatherSunny, 300000, 1 ) end What is the problem? Sorry my bad english... Real motorbike backflip / frontflip script: https://forum.mtasa.com/viewtopic.php?f=108&t=98191
Et-win Posted August 8, 2014 Posted August 8, 2014 In-game, typ the command: /debugscript 3 and you will see the answer. I guess a typos, otherwise put function 'onStart' under all other functions. (With it's event) Also: As soon as any resource starts, your script is being started too. To avoid this, change 'getRootElement()' to 'getResourceRootElement()' in the event handler. (Only by event 'onResourceStart') ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
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