Jump to content

Ok again sky color :(


JoZeFSvK

Recommended Posts

Posted

now only server

addEventHandler("onMapStart", getRootElement(), 
        function() 
        setSkyGradient(0,0,0,0,0,0) 
        end) 

hmm this is good ? because sometimes does not work

Posted

Is "onMapStart" a custom 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 (edited)
addEvent("onMapStart",true) 
addEventHandler("setSkyColor",root, 
function () 
     setSkyGradient(0,0,0,0,0,0) 
end) 
  

this will client

addEvent("onMapStart",true) 
 triggerClientEvent(source,"setSkyColor",source) 
  

and this server ? ... i need function ye ?

Edited by Guest
Posted

You can use setSkyGradient server sided.

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

client

addEvent("onMapStart",true) 
addEventHandler("setSkyColor",root, 
function () 
     setSkyGradient(0,0,0,0,0,0) 
end) 

server

addEvent("onMapStart",true) 
function () 
     setSkyGradient(0,0,0,0,0,0) 
end) 
 triggerClientEvent(source,"setSkyColor",source) 
  

from client i have delete setSkyGra.... ?

Posted

Yes, should work with server side only.

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

you forgot to close 'function' and add event, name function, and get resource :P

  
function mapStart (startedResource) 
if getResourceInfo ( startedResource, "type" ) == "map" then 
setSkyGradient(0,0,0,0,0,0) 
end 
end 
addEventHandler("onResourceStart",getRootElement(),mapStart) 
  

MTA:SA scripts/gamemodes/misc:

http://www.mtasa.xn.pl

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