Jump to content

Heey Dudes.


MiniGoveya

Recommended Posts

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. :roll:

Link to comment

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 by Guest
Link to comment

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 xD

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

maybe this is the problem (don't know :P)

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

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
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 ) 

:roll::roll::roll::roll::roll:

Edited by Guest
Link to comment
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> 

do it and it will work im sure....

Link to comment
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> 

do it and it will work im sure....

what about when a map changes the sky etc?

Link to comment
[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 :S the script what DMC Give me work, but, i've to restart that for all maps... dont stay 4ever ;/

what should i :cry::cry::cry::cry::cry::cry::cry:

Link to comment

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 :wink:

[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 :S the script what DMC Give me work, but, i've to restart that for all maps... dont stay 4ever ;/

what should i :cry::cry::cry::cry::cry::cry::cry:

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 :wink:

im sure this will work because i just tested it myself

Link to comment
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

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...