MiniGoveya Posted September 29, 2010 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.
SnoopCat Posted September 29, 2010 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 VISIT TSW RACING SERVER http://tswracing.net/
SnoopCat Posted September 29, 2010 Posted September 29, 2010 its so simple.... just do that i say and maybe it will work VISIT TSW RACING SERVER http://tswracing.net/
dzek (varez) Posted September 30, 2010 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 Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
MiniGoveya Posted September 30, 2010 Author 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?
dzek (varez) Posted September 30, 2010 Posted September 30, 2010 wiki.multitheftauto.com Search for "resource race" go to race wiki page, and check what event you need to use Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
12p Posted September 30, 2010 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()"
BinSlayer1 Posted September 30, 2010 Posted September 30, 2010 addEventHandler("onClientMapStarting", getRootElement(), Miniclient)
dzek (varez) Posted September 30, 2010 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 Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
MiniGoveya Posted September 30, 2010 Author 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.
dzek (varez) Posted September 30, 2010 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) Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
[DMC] Posted September 30, 2010 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
Castillo Posted September 30, 2010 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?? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted September 30, 2010 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. Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
SnoopCat Posted October 1, 2010 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.... VISIT TSW RACING SERVER http://tswracing.net/
Castillo Posted October 1, 2010 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? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
MiniGoveya Posted October 1, 2010 Author 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
dzek (varez) Posted October 1, 2010 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.. Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
[DMC] Posted October 1, 2010 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
MiniGoveya Posted October 1, 2010 Author 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) ???¿¿¿
dzek (varez) Posted October 1, 2010 Posted October 1, 2010 Y-E-S Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
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