Jump to content

[SOLVED]Marker Dimension


Recommended Posts

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 by Guest
  • Like 1
Link to comment
    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 by Guest
Link to comment

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
[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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...