papam77 Posted June 19, 2013 Posted June 19, 2013 Hello, why it doesn't work? function lobby(player) -- Effects local bg = playSound("sounds/sea.mp3") setSoundVolume(bg, 1.0) -- Design lobby = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "images/lobbyBG.png", true) end addCommandHandler ("system", lobby)
Moderators IIYAMA Posted June 19, 2013 Moderators Posted June 19, 2013 well as far I can see it have to work. You sure the sound is there?(and in the sound/ folder) I only see one other mistake(it is client not serverside): function lobby(player) Must be: function lobby(command) -- string commandName, [string arg1, string arg2, ...]
Moderators IIYAMA Posted June 19, 2013 Moderators Posted June 19, 2013 doesn't work Can't you read? other mistake script is starting? /debugscript 3 else show your meta.
papam77 Posted June 19, 2013 Author Posted June 19, 2013 Error: WARNING: eag/lobby_c.lua:4: Bad 'sound/player' pointer @ 'setSoundVolume'(1) lobby_c.lua function lobby(system) -- Effects local bg = playSound("sound/sea.mp3") setSoundVolume(bg, 1.0) -- Design lobby = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "images/lobbyBG.png", true) end addCommandHandler ("system", lobby) meta.xml "DeeJay" type="gamemode" />
PaiN^ Posted June 19, 2013 Posted June 19, 2013 It should be working fine ! check your files, Maybe there buged .
Dealman Posted June 19, 2013 Posted June 19, 2013 Make sure that the path to the file is correct and you didn't make a typo. Also, check to make sure that the mp3 file is not corrupted - and at last, remember to restart the resource after every change you make. So long as the file exists in ResourceName/sound/ it should be working. Also, there's no need to set the volume to 1 since that is the default value anyway.
papam77 Posted June 19, 2013 Author Posted June 19, 2013 Now works it! And why scale doesn't work? guiCreateFont(caa, "fonts/font.ttf", 20 ) And text size is still same
iPrestege Posted June 19, 2013 Posted June 19, 2013 element guiCreateFont ( string filepath[, int size=9 ] )
papam77 Posted June 19, 2013 Author Posted June 19, 2013 Version 1: caa = guiCreateLabel(0.00, 0.00, 1.00, 0.14, "Choose an Arena", true) guiCreateFont(caa, "fonts/font.ttf", 20 ) guiLabelSetHorizontalAlign(caa, "center", false) guiLabelSetVerticalAlign(caa, "center") Version 2: caa = guiCreateLabel(0.00, 0.00, 1.00, 0.14, "Choose an Arena", true) caa= guiCreateFont("fonts/font.ttf", 20 ) guiLabelSetHorizontalAlign(caa, "center", false) guiLabelSetVerticalAlign(caa, "center") And doesn't work...
iPrestege Posted June 19, 2013 Posted June 19, 2013 caa = guiCreateLabel(0.00, 0.00, 1.00, 0.14, "Choose an Arena", true) guiSetFont ( caa,guiCreateFont("fonts/font.ttf", 20 ) ) guiLabelSetHorizontalAlign(caa, "center", false) guiLabelSetVerticalAlign(caa, "center")
papam77 Posted June 19, 2013 Author Posted June 19, 2013 Yeah, work it Ty. last ask: How can set song repeat ? Again, again and again.
papam77 Posted June 19, 2013 Author Posted June 19, 2013 Yes. I have this now local bg = playSound("sound/sea.mp3") setSoundVolume(bg, 1.0) And it doesn't repeat it
papam77 Posted June 19, 2013 Author Posted June 19, 2013 It can play cca 11351351351 hours. Until player select arena
iPrestege Posted June 19, 2013 Posted June 19, 2013 Yes but you can use a timer destroy after for example let's say 1 minutes then start it again you get it?
denny199 Posted June 19, 2013 Posted June 19, 2013 Chek the parameters element playSound ( string soundPath, [ bool looped = false ] ) So: local bg = playSound("sound/sea.mp3", true) setSoundVolume(bg, 1.0)
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