Jump to content

Heey Dudes.


MiniGoveya

Recommended Posts

Posted

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:

Posted (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 by Guest

VISIT TSW RACING SERVER

http://tswracing.net/

Posted

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

Posted

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?

Posted

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

Posted

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

Posted

........................

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

Posted

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

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

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

Edited by Guest
logo_left.png
Posted
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 ) 

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

wtf is that event??

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

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

VISIT TSW RACING SERVER

http://tswracing.net/

Posted
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?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
[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:

Posted

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

Posted

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

logo_left.png
Posted
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) 
  

???¿¿¿

Posted

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

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