Jump to content

AlphaMark

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by AlphaMark

  1. Then it should look like this:? (Im just an beginner) function playTheSound() local x,y,z = getElementPosition(thePlayer) local uSound = playSound3D( 'Jihad.mp3', x, y, z, false) setSoundMaxDistance( uSound, 100 ) setSoundVolume(sound, 1) end addEvent("playTheSound", true) addEventHandler("playTheSound", getRootElement(), playTheSound)
  2. No, I want that only serveral people can hear it if they ar close to the player that plays the sound
  3. Hello i have an question. How do i make sounds local? i want to make this local: function playTheSound() local sound = playSound("Jihad.mp3", false) setSoundVolume(sound, 1) end addEvent("playTheSound", true) addEventHandler("playTheSound", getRootElement(), playTheSound)
  4. AlphaMark

    Script

    Yes i forgot to add it in the meta XML Thanks
  5. AlphaMark

    Script

    If i add ( tostring ( sound ) ) it just says False And i hear it outside MTA
  6. AlphaMark

    Script

    Im getting no errors. function playTheSound() sound = playSound("Jihad.mp3", false) setSoundVolume(sound, 1) outputChatBox("Jihad start") end addEvent("playTheSound", true) addEventHandler("playTheSound", getRootElement(), playTheSound) Also i added outputChatBox("Jihad start") to check. It says: Jihad start. But i recieve no sounds
  7. AlphaMark

    Script

    No, I still cant hear the sound
  8. AlphaMark

    Script

    I found an other problem. It wont start the Client script. function playTheSound() sound = playSound("Jihad.mp3", false) setSoundVolume(sound, 2) end addEvent("playTheSound", true) addEventHandler("playTheSound", getRootElement(), playTheSound)
  9. AlphaMark

    Script

    Yes it worked! Thank you.
  10. AlphaMark

    Script

    Hello guys. For some reason my script wont work. 10: Bad argument @ 'createExplosion' 11: Bad argument @ 'createExplosion' 12: Bad argument @ 'createExplosion' function createExplosionForPlayer(thePlayer,command) local x,y,z = getElementPosition(thePlayer) timer = setTimer (createJihadForPlayer, 2500, 1) triggerClientEvent("playTheSound", getRootElement()) end addCommandHandler("Jihad", createExplosionForPlayer) addCommandHandler("jihad", createExplosionForPlayer) function createJihadForPlayer(thePlayer,command) local createdExplosion = createExplosion(x,y,z,2) local createdExplosion = createExplosion(x,y,z,9) local createdExplosion = createExplosion(x,y,z,10) if (createdExplosion == true) then outputChatBox(getPlayerName(thePlayer).." comitted a Jihad!") end end
×
×
  • Create New...