Infernus Posted June 1, 2011 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?
HoLsTeN Posted June 1, 2011 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
Castillo Posted June 1, 2011 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)
Infernus Posted June 1, 2011 Author Posted June 1, 2011 (edited) What is the difference? only color code and same problem Edited June 1, 2011 by Guest
HoLsTeN Posted June 1, 2011 Posted June 1, 2011 lol Really I am use in my server and it is work For me
Infernus Posted June 1, 2011 Author Posted June 1, 2011 yes it is work ,, but it is show for every player !
Callum Posted June 1, 2011 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)
Infernus Posted June 1, 2011 Author Posted June 1, 2011 woow ! thaaaaaaaaaaank yoooooooouuuuuuuuuu !! I will never forget this ! and thanks for AZOZE and Solidsnake14
Castillo Posted June 1, 2011 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().
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