Jump to content

تصحيح كود


Dr.Xen

Recommended Posts

السلام عليكم ورحمة الله وبركاته ..

اسعد الله اوفتاتكم بكل خير ...

الزبدة

    addEventHandler( "onClientRender", root, function (  ) 
           local x, y, z = getElementPosition( marker ) 
           local Mx, My, Mz = getCameraMatrix(   ) 
            if ( getDistanceBetweenPoints3D( x, y, z, Mx, My, Mz ) <= 15 ) then 
               local WorldPositionX, WorldPositionY = getScreenFromWorldPosition( 2467.6999511719,-1658.5999755859,13.300000190735 +1, 0.07 )---<< هنا حطيت احداثيات الماركر 
                if ( WorldPositionX and WorldPositionY ) then 
                     dxDrawText ( "حياكم", WorldPositionX, WorldPositionY, WorldPositionX, WorldPositionY, tocolor(255,255,255,255), 1, "arial" ) 
                end 
          end 
    end ) 

ابي تصحيح^^

Link to comment
    local marker = createMarker( 2467.6999511719,-1658.5999755859,13.300000190735,"corona",2.5,255,50,100,255 ) 
    addEventHandler('onClientRender',root, 
        function() 
          local x,y,z = getElementPosition(marker) 
            local mX,mY,mZ = getCameraMatrix() 
              if ( getDistanceBetweenPoints3D( mX, mY,mZ,x,y,z ) <= 10 ) then 
                local wX,wY = getScreenFromWorldPosition(x-0.50,y,z + 0.85,0) 
                  if wX and wY then 
                    dxDrawText('Your Text',wX,wY,wX,wY,tocolor(255,255,0),1.5,'default-bold') 
               end 
            end 
        end 
    ) 

شف ^^

Link to comment
dxDrawText('Your Text',wX,wY,wX,wY,tocolor(255,255,0),1.5,'default-bold') 

حط مكان

'default-bold'

اسم الخط

"default": Tahoma

"default-bold": Tahoma Bold

"clear": Verdana

"arial": Arial

"sans": Microsoft Sans Serif

"pricedown": Pricedown (GTA's theme text)

"bankgothic": Bank Gothic Medium

"diploma": Diploma Regular

"beckett": Beckett Regular

Link to comment
ابغى اضيف من جهازي اقدر؟
local style = dxCreateFont("font.ttf") -- أسم الخط  
local marker = createMarker(2467.6999511719,-1658.5999755859,13.300000190735,"corona",2.5,255,50,100,255 ) 
    addEventHandler('onClientRender',root, 
        function() 
          local x,y,z = getElementPosition(marker) 
            local mX,mY,mZ = getCameraMatrix() 
              if ( getDistanceBetweenPoints3D( mX, mY,mZ,x,y,z ) <= 10 ) then 
                local wX,wY = getScreenFromWorldPosition(x-0.50,y,z + 0.85,0) 
                  if wX and wY then 
                 test =  dxDrawText('Your Text',wX,wY,wX,wY,tocolor(255,255,0),1.5, style) 
               end 
            end 
        end 
    ) 

__

لآتنسا تضيف الخط للمود + تحطه بالميتا

ألكود غير مجرب ^

Link to comment
local marker = createMarker( 2467.6999511719,-1658.5999755859,13.300000190735,"corona",2.5,255,50,100,255 ) 
        addEventHandler('onClientRender',root, 
            function() 
              local x,y,z = getElementPosition(marker) 
                local mX,mY,mZ = getCameraMatrix() 
                  if ( getDistanceBetweenPoints3D( mX, mY,mZ,x,y,z ) <= 10 ) then 
                    local wX,wY = getScreenFromWorldPosition(x-0.50,y,z + 0.85,0) 
                      if wX and wY then 
                        dxDrawText('Your Text',wX,wY,wX,wY,tocolor(255,255,0),1.5,'default-bold') 
                   end 
                end 
            end 
        ) 

ابغى هنا ^

Link to comment
local style = dxCreateFont("font.ttf") -- أسم الخط 
local marker = createMarker(2467.6999511719,-1658.5999755859,13.300000190735,"corona",2.5,255,50,100,255 ) 
    addEventHandler('onClientRender',root, 
        function() 
          local x,y,z = getElementPosition(marker) 
            local mX,mY,mZ = getCameraMatrix() 
              if ( getDistanceBetweenPoints3D( mX, mY,mZ,x,y,z ) <= 10 ) then 
                local wX,wY = getScreenFromWorldPosition(x-0.50,y,z + 0.85,0) 
                  if wX and wY then 
                 test =  dxDrawText('Your Text',wX,wY,wX,wY,tocolor(255,255,0),1.5, style) 
               end 
            end 
        end 
    ) 
  
  
addEventHandler("onClientMarkerHit",root, 
function (hitElement) 
if hitElement == localPlayer then 
if source == marker then 
outputChatBox("Your Text") 
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...