A3kri Posted August 2, 2013 Share 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 Link to comment
xXMADEXx Posted August 2, 2013 Share 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) Link to comment
A3kri Posted August 2, 2013 Author Share 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 Link to comment
xXMADEXx Posted August 2, 2013 Share 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) Link to comment
A3kri Posted August 2, 2013 Author Share 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 Link to comment
xXMADEXx Posted August 2, 2013 Share 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. 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