#Honda-R Posted June 19, 2013 Share Posted June 19, 2013 I'm trying to make an explode onMarkerHit Dont Work. local myMarker = createMarker(-3686, 1600.8000488281, 8.39, 'cylinder', 5, 255, 0, 0, 150) -- create myMarker function fakeBomb(x,y,z,d) if d then --Check the players Dimension if getElementDimension(getLocalPlayer()) == d then --If the players Dimension is the current dimension --Then people on other dimensions cant see this explosion createExplosion(x, y, z, 0, true, -1.0, false) end addEventHandler( "onMarkerHit", myMarker, fakeBomb ) Link to comment
Moderators IIYAMA Posted June 19, 2013 Moderators Share Posted June 19, 2013 try this: (explosion will be created at the marker) SERVER local myMarker = createMarker(-3686, 1600.8000488281, 8.39, 'cylinder', 5, 255, 0, 0, 150) -- create myMarker function fakeBomb(element,d) if d then local x,y,z = getElementPosition(source) -- source = marker createExplosion(x, y, z, 0) end end addEventHandler( "onMarkerHit", myMarker, fakeBomb ) OR client -- for client side: "onClientMarkerHit" local myMarker = createMarker(-3686, 1600.8000488281, 8.39, 'cylinder', 5, 255, 0, 0, 150) -- create myMarker function fakeBomb(element,d) if d then local x,y,z = getElementPosition(source) -- source = marker createExplosion(x, y, z, 0, true, -1.0, false) end end addEventHandler( "onClientMarkerHit", myMarker, fakeBomb ) Link to comment
#Honda-R Posted June 19, 2013 Author Share Posted June 19, 2013 client LINE NUMBER ON/OFF | EXPAND/CONTRACT | SELECT ALL -- for client side: "onClientMarkerHit" local myMarker = createMarker(-3686, 1600.8000488281, 8.39, 'cylinder', 5, 255, 0, 0, 150) -- create myMarker function fakeBomb(element,d) if d then local x,y,z = getElementPosition(source) -- source = marker createExplosion(x, y, z, 0, true, -1.0, false) end end addEventHandler( "onClientMarkerHit", myMarker, fakeBomb ) Worked Perfect! Thanks. 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