Jump to content

hitmarker playsound


BorderLine

Recommended Posts

Hi community

i have a question

well im trying to make a script, and is like this

serverside

  
  
marker1 = createMarker (815.5,-1107.5,24.7,"cylinder",1.1,255,255,225,255) 
  
function m1( ) 
  playSound ( "soundshop/hi.mp3", false ) 
end 
addEventHandler( "onMarkerHit", marker1, m1) 

when im hit the marker, play the sound. but dont work :/

Link to comment

you need to check if the element that hit the marker is the local player:

marker2 = createMarker(2797.5, -1465.6, 19.218, "cylinder", 1.1, 255, 255, 225, 255) 
   
function m2(hitplayer) 
    if hitplayer == localPlayer then 
        playSound("soundshop/hi.mp3") 
    end 
end 
  
addEventHandler("onClientMarkerHit", marker2, m2) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...