Infernus Posted June 1, 2011 Share Posted June 1, 2011 Hi Guys ,, this is my code : marker1 = createMarker(-2319.1865234375, -1837.935546875, 499.82629394531 , "cylinder" , 1, 0, 0, 204, 200) function markers(thePlayer) if source == marker1 then local x,y,z = getElementPosition(thePlayer) createObject(1655,x+20,y,z) outputChatBox("Object Created !") end end addEventHandler("onClientMarkerHit",getRootElement(),markers) Code works fine! But I have a problem, When i hit the marker object and the message shows to all players! Why? This is strange script is a client Please Is there a solution? I am very puzzled, because this client, why show all the players? Link to comment
HoLsTeN Posted June 1, 2011 Share Posted June 1, 2011 marker1 = marker1 = createMarker(-2319.1865234375, -1837.935546875, 499.82629394531 , "cylinder" , 1, 0, 0, 204, 200) function markers(thePlayer) if source == marker1 then local x,y,z = getElementPosition(thePlayer) createObject(1655,x+20,y,z) outputChatBox('#FF0000Object Created !',255, 255, 0, true ) end end addEventHandler("onClientMarkerHit",getRootElement(),markers) try this no one in my server to test sorry u try Link to comment
Castillo Posted June 1, 2011 Share Posted June 1, 2011 It's wrong. marker1 = createMarker(-2319.1865234375, -1837.935546875, 499.82629394531 , "cylinder" , 1, 0, 0, 204, 200) function markers(thePlayer) if source == marker1 then local x,y,z = getElementPosition(thePlayer) createObject(1655,x+20,y,z) outputChatBox('#FF0000Object Created !',255, 255, 0, true ) end end addEventHandler("onClientMarkerHit",getRootElement(),markers) Link to comment
Infernus Posted June 1, 2011 Author Share Posted June 1, 2011 (edited) What is the difference? only color code and same problem Edited June 1, 2011 by Guest Link to comment
HoLsTeN Posted June 1, 2011 Share Posted June 1, 2011 lol Really I am use in my server and it is work For me Link to comment
Infernus Posted June 1, 2011 Author Share Posted June 1, 2011 yes it is work ,, but it is show for every player ! Link to comment
Callum Posted June 1, 2011 Share Posted June 1, 2011 marker1 = createMarker(-2319.1865234375, -1837.935546875, 499.82629394531 , "cylinder" , 1, 0, 0, 204, 200) function markers(thePlayer) if thePlayer == getLocalPlayer() then local x,y,z = getElementPosition(thePlayer) createObject(1655,x+20,y,z) outputChatBox('Object Created !',255,255,0) end end addEventHandler("onClientMarkerHit",marker1,markers) Link to comment
Infernus Posted June 1, 2011 Author Share Posted June 1, 2011 woow ! thaaaaaaaaaaank yoooooooouuuuuuuuuu !! I will never forget this ! and thanks for AZOZE and Solidsnake14 Link to comment
Castillo Posted June 1, 2011 Share Posted June 1, 2011 I fixed the bug here: marker1 = marker1 = createMarker(-2319.1865234375, -1837.935546875, 499.82629394531 , "cylinder" , 1, 0, 0, 204, 200) You did marker1 = marker1 = createMarker(). 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