A3kri Posted August 2, 2013 Posted August 2, 2013 I know this may sound stupid but Idk why it doesn't work x.x local myMarker = createMarker ( -710.25555419922, 962.29443359375, 12.410507202148, "cylinder", 1.5, 255, 0, 0, 255 ) addEventHandler ( "onClientMarkerHit", myMarker, function () outputChatBox ( " hi " .. getPlayerName(getLocalPlayer()), getRootElement(), 100, 100, 100, true ) end) nothing happens while it should print hi xxxxx
xXMADEXx Posted August 2, 2013 Posted August 2, 2013 Arguments for outputChatBox are different on client side, local myMarker = createMarker ( -710.25555419922, 962.29443359375, 12.410507202148, "cylinder", 1.5, 255, 0, 0, 255 ) addEventHandler ( "onClientMarkerHit", myMarker, function ( p ) if ( p == localPlayer ) then outputChatBox ( " hi " .. getPlayerName(p), 100, 100, 100, true ) end end)
A3kri Posted August 2, 2013 Author Posted August 2, 2013 (edited) Arguments for outputChatBox are different on client side, local myMarker = createMarker ( -710.25555419922, 962.29443359375, 12.410507202148, "cylinder", 1.5, 255, 0, 0, 255 ) addEventHandler ( "onClientMarkerHit", myMarker, function ( p ) if ( p == localPlayer ) then outputChatBox ( " hi " .. getPlayerName(p), 100, 100, 100, true ) end end) thanks, it's fine. Edited August 2, 2013 by Guest
xXMADEXx Posted August 2, 2013 Posted August 2, 2013 getAttachedElements returns a table. addEventHandler ( "onClientMarkerHit", myMarker, function ( p ) if ( p == localPlayer ) then local attachedElements = getAttachedElements (p) for _,v in ipairs ( attachedElements ) detachElements ( v, p ) end outputChatBox ( " hi " .. getPlayerName(p), 100, 100, 100, true ) end end)
A3kri Posted August 2, 2013 Author Posted August 2, 2013 getAttachedElements returns a table. addEventHandler ( "onClientMarkerHit", myMarker, function ( p ) if ( p == localPlayer ) then local attachedElements = getAttachedElements (p) for _,v in ipairs ( attachedElements ) detachElements ( v, p ) end outputChatBox ( " hi " .. getPlayerName(p), 100, 100, 100, true ) end end) yes i solved it x.x but you answered before i edit lol thanks very much
xXMADEXx Posted August 2, 2013 Posted August 2, 2013 getAttachedElements returns a table. addEventHandler ( "onClientMarkerHit", myMarker, function ( p ) if ( p == localPlayer ) then local attachedElements = getAttachedElements (p) for _,v in ipairs ( attachedElements ) detachElements ( v, p ) end outputChatBox ( " hi " .. getPlayerName(p), 100, 100, 100, true ) end end) yes i solved it x.x but you answered before i edit lol thanks very much No problameo.
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