proracer Posted June 22, 2010 Share Posted June 22, 2010 Hey guys.I started to make DM map but DM with cars not guns, Race type but DM.I wanted to put song into the map and i think i must use: "playSound" function right? If is that correct i don't know what event i must trigger to play this because i searched events connected for when map starts or something but i found nothing.So my question is: Is is possible to play song and what event i must trigger to start it.. and it should be client event right? Sorry if im really annoying im not that pro in scripting but im good in mapping Plz help me if you can Link to comment
Dark Dragon Posted June 22, 2010 Share Posted June 22, 2010 if you put the code in your map resource onClientResourceStart will be fine. Link to comment
proracer Posted June 22, 2010 Author Share Posted June 22, 2010 function resource_starts_0 () end addEventHandler ( "onClientResourceStart", getRootElement(), resource_starts_0 ) function resource_starts_1 () playSound ( "Brian Nrg - Suck My Ballz.mp3" ) end Is this ok? And yeah i copied from someone <.< Link to comment
Dark Dragon Posted June 22, 2010 Share Posted June 22, 2010 your function contains no instructions (the resource_starts_0 one). this will work: function resource_starts_0 () playSound ( "Brian Nrg - Suck My Ballz.mp3" ) end addEventHandler ( "onClientResourceStart", getRootElement(), resource_starts_0 ) if you don't want the sound to be played whenever any resource starts do this: function resource_starts_0 () playSound ( "Brian Nrg - Suck My Ballz.mp3" ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), resource_starts_0 ) Link to comment
proracer Posted June 22, 2010 Author Share Posted June 22, 2010 Cool i will check it now Link to comment
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