nowofresh Posted December 16, 2010 Posted December 16, 2010 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 )
Arran Posted December 16, 2010 Posted December 16, 2010 onResourceStart is server side only. Change them to onClientResourceStart.
nowofresh Posted December 17, 2010 Author Posted December 17, 2010 function pokazlogo() guiCreateStaticImage( 0, 0, 1200, 1500, "img/pokazlogo.png", false ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), pokazlogo ) What wrong ? Picture cant work
Arran Posted December 17, 2010 Posted December 17, 2010 I see nothing wrong there. So its either img/pokazlogo.png is not there or its not put in the meta.xml ( )
nowofresh Posted December 17, 2010 Author Posted December 17, 2010 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>
Aibo Posted December 17, 2010 Posted December 17, 2010 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.
nowofresh Posted December 17, 2010 Author Posted December 17, 2010 [list=]Thanks, gays. Working great.
nowofresh Posted December 18, 2010 Author Posted December 18, 2010 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
nowofresh Posted December 18, 2010 Author Posted December 18, 2010 yee <file src="n_polaczenie/snds/tlo.mp3" /> </meta>
Castillo Posted December 18, 2010 Posted December 18, 2010 try this, without function should do the same job i think. local sound = playSound("n_polaczenie/snds/tlo.mp3", false) setSoundVolume(sound, 1.0)
Aibo Posted December 18, 2010 Posted December 18, 2010 same thing, if "n_polaczenie" is your resource — dont specify it's name in relative file path.
nowofresh Posted December 18, 2010 Author Posted December 18, 2010 It is a, rescources/nl/n_polaczenie What problem ?
Aibo Posted December 18, 2010 Posted December 18, 2010 addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource() , playmusic) you have ) missing after getThisResource().
milkshake333 Posted December 18, 2010 Posted December 18, 2010 And remove "n_polaczenie/" from the playSound function...
Castillo Posted December 19, 2010 Posted December 19, 2010 gays.[/b]Working great. lol Off-topic: lol, i didn't noticed of that.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now