Jump to content

Picturs problem.


nowofresh

Recommended Posts

Posted

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 ) 
  

Posted
function pokazlogo() 
   guiCreateStaticImage( 0, 0, 1200, 1500, "img/pokazlogo.png", false ) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), pokazlogo ) 

What wrong ? Picture cant work

Posted

I see nothing wrong there.

So its either img/pokazlogo.png is not there or its not put in the meta.xml ( )

Posted

I cant see fucking picture.

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

Posted

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.

?

Posted

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

Posted

do you have the sound file in meta.xml?

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

try this, without function should do the same job i think.

local sound = playSound("n_polaczenie/snds/tlo.mp3", false) 
setSoundVolume(sound, 1.0)  

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
addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource() , playmusic)  

you have ) missing after getThisResource().

?

Posted
  • gays.[/b]
    Working great.

lol

Off-topic:

lol, i didn't noticed of that.

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.

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