ZeyadGTX Posted June 8, 2014 Posted June 8, 2014 This resource is music which you can make command it plays music but i have problem you can play 2 music in same time i need help in . when i start music and i start the another the first stops i don't want 2 musics play in the same time ------fox function music12( name ) local sound = playSound("music/fox.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "fox", true ) addEventHandler( "fox", getRootElement(), music12 ) ------fast function music11( name ) local sound = playSound("music/fast.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "fast", true ) addEventHandler( "fast", getRootElement(), music11 ) ------amricano function music10( name ) local sound = playSound("music/amricano.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "amricano", true ) addEventHandler( "amricano", getRootElement(), music10 ) ------joker function music9( name ) local sound = playSound("music/joker.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "joker", true ) addEventHandler( "joker", getRootElement(), music9 ) ------badboy function music8( name ) local sound = playSound("music/badboys.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "badboys", true ) addEventHandler( "badboys", getRootElement(), music8 ) --------- boys ... ---------- function music7( name ) local sound = playSound("music/boysboysboys.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "boysboysboys", true ) addEventHandler( "boysboysboys", getRootElement(), music7 ) --------- call me may be ----------- function music6( name ) local sound = playSound("music/callmemaybe.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "callmemaybe", true ) addEventHandler( "callmemaybe", getRootElement(), music6 ) ------ do you wanna function music( name ) local sound = playSound("music/doyouwanna.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "doyouwanna", true ) addEventHandler( "doyouwanna", getRootElement(), music ) -----------i feel good -------- function music5( name ) local sound = playSound("music/feelgood.mp3") setSoundVolume(sound, 50) end addEvent( "feelgood", true ) addEventHandler( "feelgood", getRootElement(), music5 ) --------fus ro daher--- function music4( name ) local sound = playSound("music/fusrodah.mp3") setSoundVolume(sound, 50) end addEvent( "fusrodah", true ) addEventHandler( "fusrodah", getRootElement(), music4 ) --------Gangnam style function music3( name ) local sound = playSound("music/gangnamstyle.mp3") setSoundVolume(sound, 50) end addEvent( "gangnamstyle", true ) addEventHandler( "gangnamstyle", getRootElement(), music3) ------------gentleman function music2( name ) local sound = playSound("music/gentleman.mp3") setSoundVolume(sound, 50) end addEvent( "gentleman", true ) addEventHandler( "gentleman", getRootElement(), music2 ) -----------------gunmanstyle function music1() local sound = playSound("music/gunmanstyle.mp3") setSoundVolume(sound, 50) end addEvent( "gunmanstyle", true ) addEventHandler( "gunmanstyle", getRootElement(), music1 ) ----------harlemshake function music1() local sound = playSound("music/harlemshake.mp3") setSoundVolume(sound, 50) end addEvent( "harlemshake", true ) addEventHandler( "harlemshake", getRootElement(), music1 ) ----------- ineeddoller -------- function music1() local sound = playSound("music/ineeddollar.mp3") setSoundVolume(sound, 50) end addEvent( "ineeddollar", true ) addEventHandler( "ineeddollar", getRootElement(), music1 ) ----------killingfools function music1() local sound = playSound("music/killingfools.mp3") setSoundVolume(sound, 50) end addEvent( "killingfools", true ) addEventHandler( "killingfools", getRootElement(), music1 ) --------------loser function music1() local sound = playSound("music/loser.mp3") setSoundVolume(sound, 50) end addEvent( "loser", true ) addEventHandler( "loser", getRootElement(), music1 ) -------------nevergiveup function nevergiveup() local sound = playSound("music/nevergiveup.mp3") setSoundVolume(sound, 50) end addEvent( "nevergiveup", true ) addEventHandler( "nevergiveup", getRootElement(), nevergiveup ) --------nyancat function nyancat() local sound = playSound("music/nyancat.mp3") setSoundVolume(sound, 50) end addEvent( "nyancat", true ) addEventHandler( "nyancat", getRootElement(), nyancat ) -----------sinking function sinking() local sound = playSound("music/sinking.mp3") setSoundVolume(sound, 50) end addEvent( "sinking", true ) addEventHandler( "sinking", getRootElement(), sinking ) ---------stillalive function stillalive() local sound = playSound("music/stillalive.mp3") setSoundVolume(sound, 50) end addEvent( "stillalive", true ) addEventHandler( "stillalive", getRootElement(), stillalive ) ----------surprise function surprise() local sound = playSound("music/surprise.mp3") setSoundVolume(sound, 50) end addEvent( "surprise", true ) addEventHandler( "surprise", getRootElement(), surprise ) --------tunaktunaktun function tunaktunaktun() local sound = playSound("music/tunaktunaktun.mp3") setSoundVolume(sound, 50) end addEvent( "tunaktunaktun", true ) addEventHandler( "tunaktunaktun", getRootElement(), tunaktunaktun ) -------------youtouchmyshit function youtouchmyshit() local sound = playSound("music/youtouchmyshit.mp3") setSoundVolume(sound, 50) end addEvent( "youtouchmyshit", true ) addEventHandler( "youtouchmyshit", getRootElement(), youtouchmyshit ) ----fox function music(player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name .. ": #00ffff What does the Fox say?.", getRootElement(), r, g, b, true ) triggerClientEvent ("fox", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("fox", music) ----fast function music(player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name .. ": #2600FF Animals.", getRootElement(), r, g, b, true ) triggerClientEvent ("fast", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("fast", music) ----amricano function music(player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name .. ": #2600FF We No Speak Americano.", getRootElement(), r, g, b, true ) triggerClientEvent ("amricano", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("amricano", music) ----joker function music(player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name .. ": #2600FF Giggle bitch.", getRootElement(), r, g, b, true ) triggerClientEvent ("joker", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("joker", music) ----badboys function music(player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name .. ": #2600FF is a good boy.", getRootElement(), r, g, b, true ) triggerClientEvent ("badboys", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("isagoodboy", music) -----boysboysboys-------- addCommandHandler("music.boysboysboys", function (player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name .. ": #2600FF boys boys boys.", getRootElement(), r, g, b, true ) triggerClientEvent ("boysboysboys", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end ) ----call me maybe------------------- function music1(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF call me may be .", getRootElement(), r, g, b, true ) triggerClientEvent ("callmemaybe", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("music.callmemaybe", music1) --------do you wanna ---------- function music2(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF do you wanna .", getRootElement(), r, g, b, true ) triggerClientEvent ("doyouwanna", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("doyouwanna", music2) --------ifeel good----- function music3(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF I feel good .", getRootElement(), r, g, b, true ) triggerClientEvent ("feelgood", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("ifeelgood", music3) -------fus ro daher function music5(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF fus ro daher .", getRootElement(), r, g, b, true ) triggerClientEvent ("fusrodah", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("fusrodaher", music5) -------gangnam style ---- function music4(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF Oppa Gangnam style .", getRootElement(), r, g, b, true ) triggerClientEvent ("gangnamstyle", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("gangnamstyle", music4 ) ------------gentleman function music4(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF gentleman.", getRootElement(), r, g, b, true ) triggerClientEvent ("gentleman", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("gentleman", music4 ) -------------gunmanstyle function music4(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF gunman style.", getRootElement(), r, g, b, true ) triggerClientEvent ("gunmanstyle", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("music.gunmanstyle", music4 ) -------------harlemshake function harlemshake(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF harlem shake.", getRootElement(), r, g, b, true ) triggerClientEvent ("harlemshake", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("harlemshake", harlemshake ) -------------i need doller ------- function harlemshake(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF I need a dollar dollar dollar.", getRootElement(), r, g, b, true ) triggerClientEvent ("ineeddollar", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("ineeddollar", harlemshake ) ----------killingfools function killingfools(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF Killing fools.", getRootElement(), r, g, b, true ) triggerClientEvent ("killingfools", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("killingfools", killingfools ) ---------loser function loser(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF loser.", getRootElement(), r, g, b, true ) triggerClientEvent ("loser", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("loser", loser ) ----------nevergiveup function nevergiveup(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF Never gonna give you up.", getRootElement(), r, g, b, true ) triggerClientEvent ("nevergiveup", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("nevergiveup", nevergiveup ) -----------nyancat function nyancat(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then outputChatBox ( "" .. name1 .. ": #2600FF Nyan cat.", getRootElement(), r, g, b, true ) triggerClientEvent ("nyancat", getRootElement()) else outputChatBox ( "this command for vip group", player, 255, 0, 0, true ) return end end addCommandHandler("nyancat", nyancat ) ------sinking function sinking(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then My nick in MTA is Spider
-.Paradox.- Posted June 8, 2014 Posted June 8, 2014 Nobody is going to fix 233 & 310 lines as far as i know.. Well, check if there is a playing music, and if it's playing then stop it using. stopSound P.S: Don't forget to define 'The Current Playing Sound/Music' If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
ZeyadGTX Posted June 8, 2014 Author Posted June 8, 2014 ahahhaahah 310 lines lol its hard My nick in MTA is Spider
.:HyPeX:. Posted June 9, 2014 Posted June 9, 2014 ahahhaahah 310 lines lol its hard Its not hard, its a waste of time to read them, the owner of the code can easily go over the errors alot faster. My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
-Doc- Posted May 24, 2015 Posted May 24, 2015 ahahhaahah 310 lines lol its hard Its not hard, its a waste of time to read them, the owner of the code can easily go over the errors alot faster. Thats pretty simple to make that i just used ipairs and worked My scripting skills
Walid Posted May 24, 2015 Posted May 24, 2015 make sound as a global variable , just remove local then use sth like this if ( sound and isElement(sound)) then stopSound (sound ) -- or destroy it destroyElement(sound) end Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
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