MiniGoveya Posted September 29, 2010 Share Posted September 29, 2010 Well this time I come to bother asking for help with another issue of scripting. I would you like to know how I can put a 'setSkyGradient' and 'setWaterColor' which is for all the maps on the server? that is, to stay forever. Something similar as in the server >VIP< they have a black sky and green water on all maps. So, that's all, I hope your answer, thank you very much in advance. Link to comment
SnoopCat Posted September 29, 2010 Share Posted September 29, 2010 (edited) they have Maybe just do a script similar to this 1 The lua setSkyGradient( 200, 0, 0, 200, 0, 0 ) outputChatBox ( "Red Sky Started" ) and the Meta <meta> <info author="SomeGuy" description="special sky " version="1" type="script" /> <script src="sky.lua"/> </meta> Edited September 29, 2010 by Guest Link to comment
MiniGoveya Posted September 29, 2010 Author Share Posted September 29, 2010 huh? i don't understand u ._. Link to comment
SnoopCat Posted September 29, 2010 Share Posted September 29, 2010 its so simple.... just do that i say and maybe it will work Link to comment
dzek (varez) Posted September 30, 2010 Share Posted September 30, 2010 Check Wiki, search for race resource events, there was something like onClientRaceStart or something similar. Add a handler to this event that sets sky gradient and water colour. and start your resource Link to comment
MiniGoveya Posted September 30, 2010 Author Share Posted September 30, 2010 ok, ty, but.. there is no way to do to start only? EDIT: Can you give me some links from wiki ? idk how use that EDIT2: ok, i tried with this: function Miniclient () setWaterColor( 255, 0 , 0 ) setSkyGradient( 0 , 0 , 0 , 0 , 0 , 0 ) end addEventHandler( "onClientRaceStart", resourceRoot, Miniclient ) dont have errors, but isn't work. :l what should do i? Link to comment
dzek (varez) Posted September 30, 2010 Share Posted September 30, 2010 wiki.multitheftauto.com Search for "resource race" go to race wiki page, and check what event you need to use Link to comment
12p Posted September 30, 2010 Share Posted September 30, 2010 maybe this is the problem (don't know ) function Miniclient () setWaterColor( 255, 0 , 0 ) setSkyGradient( 0 , 0 , 0 , 0 , 0 , 0 ) end addEventHandler( "onClientRaceStart", getRootElement(), Miniclient )--"resourceRoot" doesn't appear anywhere. Use "getResourceRootElement()" or "getRootElement()" Link to comment
BinSlayer1 Posted September 30, 2010 Share Posted September 30, 2010 addEventHandler("onClientMapStarting", getRootElement(), Miniclient) Link to comment
dzek (varez) Posted September 30, 2010 Share Posted September 30, 2010 ........................ you are on my personel blacklist to, because you are much too lazy to call yourself a scripter https://wiki.multitheftauto.com/wiki/Resource:Race it's onClientMapStarting Link to comment
MiniGoveya Posted September 30, 2010 Author Share Posted September 30, 2010 ........................you are on my personel blacklist to, because you are much too lazy to call yourself a scripter ] 1 .- me? 2.- it doesn't work. Link to comment
dzek (varez) Posted September 30, 2010 Share Posted September 30, 2010 1. yes 2. because you didnt read that damn link function setColors() outputChatBox("whatever") end addEvent("onClientMapStarting") addEventHandler("onClientMapStarting", getRootElement(), setColors) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), setColors) Link to comment
[DMC] Posted September 30, 2010 Share Posted September 30, 2010 (edited) function Miniclient () setWaterColor( 255, 0 , 0 ) -- Sets water to red (r,g,b) setSkyGradient( 0 , 0 , 0 , 0 , 0 , 0 ) -- Sets sky to black (r,g,b - r,g,b) end addEventHandler( "onClientResourceStart", resourceRoot, Miniclient ) Edited September 30, 2010 by Guest Link to comment
Castillo Posted September 30, 2010 Share Posted September 30, 2010 function Miniclient () setWaterColor( 255, 0 , 0 ) -- Sets water to red (r,g,b) setSkyGradient( 0 , 0 , 0 , 0 , 0 , 0 ) -- Sets sky to black (r,g,b - r,g,b) end addEventHandler( "onClientResourceStarter", resourceRoot, Miniclient ) wtf is that event?? Link to comment
[DMC] Posted September 30, 2010 Share Posted September 30, 2010 you know what i mean (fixed) Link to comment
dzek (varez) Posted September 30, 2010 Share Posted September 30, 2010 [DMC] I've already posted GOOD solution. This won't work, because some races are changing weather etc, and sky gradients are getting lost. Link to comment
SnoopCat Posted October 1, 2010 Share Posted October 1, 2010 they have Maybe just do a script similar to this 1The lua setSkyGradient( 200, 0, 0, 200, 0, 0 ) outputChatBox ( "Red Sky Started" ) and the Meta <meta> <info author="SomeGuy" description="special sky " version="1" type="script" /> <script src="sky.lua"/> </meta> do it and it will work im sure.... Link to comment
Castillo Posted October 1, 2010 Share Posted October 1, 2010 they have Maybe just do a script similar to this 1The lua setSkyGradient( 200, 0, 0, 200, 0, 0 ) outputChatBox ( "Red Sky Started" ) and the Meta <meta> <info author="SomeGuy" description="special sky " version="1" type="script" /> <script src="sky.lua"/> </meta> do it and it will work im sure.... what about when a map changes the sky etc? Link to comment
MiniGoveya Posted October 1, 2010 Author Share Posted October 1, 2010 [DMC] I've already posted GOOD solution. This won't work, because some races are changing weather etc, and sky gradients are getting lost. you have all the reason the script what DMC Give me work, but, i've to restart that for all maps... dont stay 4ever ;/ what should i Link to comment
dzek (varez) Posted October 1, 2010 Share Posted October 1, 2010 I gave you working and tested script 7 posts ago! Just copy and paste it! CLICK And guys, don't try to to help if you don't know what are you doing. Random not working solutions will just confuse topic creator more, but won't help.. Link to comment
[DMC] Posted October 1, 2010 Share Posted October 1, 2010 ok varez what your saying is true minigoveya added the script in a resource not map and because i got a race server and i know this stuff, it wont change the sky gradient but it will change time/weather if its overriding is set to false in race config [DMC] I've already posted GOOD solution. This won't work, because some races are changing weather etc, and sky gradients are getting lost. you have all the reason the script what DMC Give me work, but, i've to restart that for all maps... dont stay 4ever ;/ what should i and for you mini, Go to Admin panel and then tab resources and search for race, when you find it double click it and search for sky, time settings and set overriding to true im sure this will work because i just tested it myself Link to comment
MiniGoveya Posted October 1, 2010 Author Share Posted October 1, 2010 I gave you working and tested script 7 posts ago!Just copy and paste it! CLICK And guys, don't try to to help if you don't know what are you doing. Random not working solutions will just confuse topic creator more, but won't help.. ok, but i have to change outputChatBox for setWaterColor and skyGradient? something like this: function setColors() setWaterColor( 255,0,0 ) setWaterColor( 0,0,0,0,0,0 ) end addEvent("onClientMapStarting") addEventHandler("onClientMapStarting", getRootElement(), setColors) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), setColors) ???¿¿¿ Link to comment
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