Jump to content

Picturs problem.


nowofresh

Recommended Posts

Hey,

I am going to create like that:

Player connect with a my sever.

=> Show 1 picture (5 sec)

=>Show 2 picture (10sec)

=>Show window in gui

.

function pokazlogo(x,y,width,height,path,relative,thefunction,time,Interval, TimesToExecute) 
    
   guiCreateStaticImage( 0, 0, 1300, 1000, "img/pokazlogo.png", false ) 
   setTimer ( pokazwczytywanie, 50, 1) 
   --OutputChatBox("Zrobione...") 
end 
addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ), pokazlogo ) 
  
function pokazwczytywanie(x,y,width,height,path,relative,thefunction,time,Interval, TimesToExecute) 
   guiCreateStaticImage( 0, 0, 1300, 1000, "img/pokazwczytywanie.png", false ) 
   setTimer ( pokazlogowanie, 50, 1) 
end 
addEventHandler( "onResourceStart", rootElement, pokazwcztytywanie ) 
  

Link to comment

file path should be relative to your resource folder, not "resources" folder.

assuming that your resource is "n_polaczenie":

  
<meta> 
    <info author="NL team" version="1.0" type="gamemode"  /> 
    
    <script src="login_c.lua" type="client" /> 
    <file src="img/pokazlogo.png" /> 
  
</meta> 
  

and if "n_polaczenie" is not your resource, but a folder IN your resource, then you need to specify it in guiCreateStaticImage().

basically, paths should be the same in meta and script.

Link to comment

How to play music in the background "onClientResourceStart" ?

  
function playmusic() 
    local sound = playSound("n_polaczenie/snds/tlo.mp3", false)  
    setSoundVolume(sound, 1.0)  
end 
  
addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource() , playmusic)  
  

Can't work :(

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