Jump to content

كيف عمل ذي دي


Recommended Posts

الكود اهو

العامل شخصيات سرفر طاره

ازاي اعمل اليخش عليه يجيلو لووحتي

  
Texts = { 
{ " Name ",  x , y , z  ,  0, Size }, 
{ " Name ",  x , y , z  ,  0, Size }, 
{ " Name ",  x , y , z  ,  0, Size }, 
  
} 
  
  
addEventHandler("onClientRender", root, 
function() 
    for index, value in ipairs( Texts ) do 
        if localPlayer:getDimension() == value[5] then 
            local PP = { getElementPosition(localPlayer) }; 
            local SS = { getScreenFromWorldPosition( value[2] , value[3] , value[4] +1.3 ) } ; 
            if SS[1] and SS[2] then 
                local distance = getDistanceBetweenPoints3D( value[2] , value[3] , value[4], PP[1], PP[2], PP[3] ); 
                if distance < 15 then 
                    dxDrawText( value[1] , SS[1], SS[2]-3, SS[1], SS[2]-3, tocolor(0, 0, 0, 100), value[6] -(distance/15), "default-bold", "center", "top", false, false, false, false, false); 
                    dxDrawText( value[1] , SS[1], SS[2], SS[1], SS[2], tocolor(255, 255, 255, 200), value[6] -(distance/15), "default-bold", "center", "top", false, false, false, false, false); 
                end 
            end 
        end 
    end 
end ); 
  

Link to comment

اول شي بشرح لك الكود د

خد الاحداتيات

وحطها هون

if getDistanceBetweenPoints3D(X,Y,Z,getElementPosition(localPlayer)) < 30 then 

ونفس الحدايات حطها هون

x,y = getScreenFromWorldPosition(X,Y,Z+ 1.5) 

لون الكتابة والحجم

tocolor(255,255,0,255),2.0,"default-bold 
 

متااااال

addEventHandler("onClientRender",root, 
    function() 
        if getDistanceBetweenPoints3D(-3524.79932,-3007.64111,17.21294,getElementPosition(localPlayer)) < 30 then 
            x,y = getScreenFromWorldPosition(-3524.79932,-3007.64111,17.21294+ 1.5) 
            if x and y then 
                dxDrawText("[مرحبا بكم  في بداية ].",x,y,x,y,tocolor(255,255,0,255),2.0,"default-bold") 
            end 
        end 
    end 
) 

Link to comment
اول شي بشرح لك الكود د

خد الاحداتيات

وحطها هون

if getDistanceBetweenPoints3D(X,Y,Z,getElementPosition(localPlayer)) < 30 then 

ونفس الحدايات حطها هون

x,y = getScreenFromWorldPosition(X,Y,Z+ 1.5) 

لون الكتابة والحجم

tocolor(255,255,0,255),2.0,"default-bold 
  
 

متااااال

addEventHandler("onClientRender",root, 
    function() 
        if getDistanceBetweenPoints3D(-3524.79932,-3007.64111,17.21294,getElementPosition(localPlayer)) < 30 then 
            x,y = getScreenFromWorldPosition(-3524.79932,-3007.64111,17.21294+ 1.5) 
            if x and y then 
                dxDrawText("[مرحبا بكم  في بداية ].",x,y,x,y,tocolor(255,255,0,255),2.0,"default-bold") 
            end 
        end 
    end 
) 

د علشان تسوي

كتابة

بوفيه طاره

:arrowup::arrowup:

Link to comment

اهو اخ اسوسكر

الكود بتاع المركر الازرق

Marker = createMarker ( x, y, z, "cylinder", 2.5,  0, 255, 255, 255 ) 
  
  
addEventHandler('onClientMarkerHit', Marker, 
  function ( hitPlayer ) 
        if ( hitPlayer == localPlayer ) then 
           guiSetVisible (GUIEditor.window[1], true ) 
            showCursor( true ) 
        end 
    end 
) 

كيف اخفي بقا المركر؟

Link to comment

طيب الكود اهو ممكن تعملهولي بعد اذنك؟

Marker = createMarker ( x, y, z, "cylinder", 2.5,  0, 255, 255, 255 ) 
  
  
addEventHandler('onClientMarkerHit', Marker, 
  function ( hitPlayer ) 
        if ( hitPlayer == localPlayer ) then 
           guiSetVisible (GUIEditor.window[1], true ) 
            showCursor( true ) 
        end 
    end 
) 

Link to comment
طيب الكود اهو ممكن تعملهولي بعد اذنك؟
Marker = createMarker ( x, y, z, "cylinder", 2.5,  0, 255, 255, 255 ) 
  
  
addEventHandler('onClientMarkerHit', Marker, 
  function ( hitPlayer ) 
        if ( hitPlayer == localPlayer ) then 
           guiSetVisible (GUIEditor.window[1], true ) 
            showCursor( true ) 
        end 
    end 
) 

Marker = createMarker ( x, y, z, "cylinder", 2.5,  0, 255, 255, 255 ) 
setElementAlpha(Marker, 0) 
  
addEventHandler('onClientMarkerHit', Marker, 
  function ( hitPlayer ) 
        if ( hitPlayer == localPlayer ) then 
           guiSetVisible (GUIEditor.window[1], true ) 
            showCursor( true ) 
        end 
    end 
) 
Link to comment

للمعلوميه تقدر تخفي الماركر من اخر ارقمنت وهو رقم 255

Marker = createMarker ( x, y, z, "cylinder", 2.5,  0, 255, 255, 255 ) -- كذا الماركر ظاهر 

تحطه صفر

Marker = createMarker ( x, y, z, "cylinder", 2.5,  0, 255, 255,0) -- كذا الماركر مخفي 
Link to comment
addEventHandler("onClientRender", getRootElement(),  
function() 
                local x, y, z = getElementPosition(YourMarker) 
                local x2, y2, z2 = getElementPosition(localPlayer) 
                if ( isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true) ) then 
                    local sx, sy = getScreenFromWorldPosition(x, y, z+1.3) 
                    if(sx) and (sy) then 
                        local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) 
                        if( distance < 30 ) then 
                            dxDrawText("Text", sx+2, sy+2, sx, sy, tocolor(0,0,0), 2-(distance/20), "arial", "center", "center") 
                            dxDrawText("Text", sx, sy, sx, sy, tocolor(255,255,0), 2-(distance/20), "arial", "center", "center") 
            end 
        end 
    end 
end ) 

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