Electro88 Posted July 14, 2016 Share Posted July 14, 2016 (edited) Hello ! i have problem on dimension i set the 3. marker dimension 1 but i go dimension 0 and i see gui i how fix it ? please help marker = createMarker( -1240.044921875, 472.73046875, 6.1875, "cylinder", 1.5, 255, 0, 0, 255 ) marker2 = createMarker( 2817.818359375, -1449.072265625, 27.15625, "cylinder", 1.5, 255, 0, 0, 255 ) marker3 = createMarker( -1950.7351074219, 146.02836608887, 27.654912948608, "cylinder", 1.5, 255, 0, 0, 255 ) setElementDimension (marker3, 1) function show2(hitPlayer) if (source == marker) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) elseif (source == marker2) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) elseif (source == marker3) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) end end addEventHandler("onMarkerHit", getRootElement(),show2) Edited July 14, 2016 by Guest 1 Link to comment
Captain Cody Posted July 14, 2016 Share Posted July 14, 2016 (edited) marker = createMarker( -1240.044921875, 472.73046875, 6.1875, "cylinder", 1.5, 255, 0, 0, 255 ) marker2 = createMarker( 2817.818359375, -1449.072265625, 27.15625, "cylinder", 1.5, 255, 0, 0, 255 ) marker3 = createMarker( -1950.7351074219, 146.02836608887, 27.654912948608, "cylinder", 1.5, 255, 0, 0, 255 ) setElementDimension (marker3, 1) function show2(hitPlayer,dim) if (source == marker and dim) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) elseif (source == marker2) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) elseif (source == marker3) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) end end addEventHandler("onMarkerHit", getRootElement(),show2) Edited July 14, 2016 by Guest Link to comment
فاّرس Posted July 14, 2016 Share Posted July 14, 2016 marker = createMarker( -1240.044921875, 472.73046875, 6.1875, "cylinder", 1.5, 255, 0, 0, 255 ) marker2 = createMarker( 2817.818359375, -1449.072265625, 27.15625, "cylinder", 1.5, 255, 0, 0, 255 ) marker3 = createMarker( -1950.7351074219, 146.02836608887, 27.654912948608, "cylinder", 1.5, 255, 0, 0, 255 ) setElementDimension (marker3, 1) function show2(hitPlayer,dim) if ( source == marker and getElementType ( hitPlayer ) == 'player' ) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) elseif ( source == marker2 and getElementType ( hitPlayer ) == 'player' ) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) elseif ( source == marker3 and dim and getElementType ( hitPlayer ) == 'player' ) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) end end addEventHandler("onMarkerHit", getRootElement(),show2) Link to comment
Captain Cody Posted July 14, 2016 Share Posted July 14, 2016 [lua] marker = createMarker( -1240.044921875, 472.73046875, 6.1875, "cylinder", 1.5, 255, 0, 0, 255 ) marker2 = createMarker( 2817.818359375, -1449.072265625, 27.15625, "cylinder", 1.5, 255, 0, 0, 255 ) marker3 = createMarker( -1950.7351074219, 146.02836608887, 27.654912948608, "cylinder", 1.5, 255, 0, 0, 255 ) setElementDimension (marker3, 1) function show2(hitPlayer,dimension ) if dimension and getElementDimension(hitPlayer) == getElementDimension(source) then if (source == marker ) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) elseif (source == marker2) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) elseif (source == marker3) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) end end end addEventHandler("onMarkerHit", getRootElement(),show2) [/lua] Link to comment
Walid Posted July 14, 2016 Share Posted July 14, 2016 Same Try this one function show2(hitPlayer,dim) if (isElement(hitPlayer) and getElementType(hitPlayer) == "player" ) and dim then if source == marker then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) elseif (source == marker2) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) elseif (source == marker3) then triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) end end end addEventHandler("onMarkerHit", getRootElement(),show2) Link to comment
Electro88 Posted July 14, 2016 Author Share Posted July 14, 2016 @Sha67 Working ! Thank you so much everybody for help 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