Jump to content

استفسار بخصوص ,, كود يكتب فوق البد + شرحة ^_^


You[S]eF.

Recommended Posts

bool dxDrawText ( string text, float left, float top [, float right=left, float bottom=top, int color=white,  
                  float scale=1, mixed font="default", string alignX="left", string alignY="top", 
                  bool clip=false, bool wordBreak=false, bool postGUI=false, 
                  bool colorCoded=false, bool subPixelPositioning=false,  
                  float fRotation=0, float fRotationCenterX=0, float fRotationCenterY=0 ] ) 

Link to comment

استبدل element

بــ اسم البيد حقك ..

و استبدل your Text

بالكلام الي تبيه

واستبدل

r,g,b بالون الي تبيه

:)

addEventHandler("onClientRender", getRootElement(),  
function() 
                                local x, y, z = getElementPosition( element ) 
                                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("your text", sx+2, sy+2, sx, sy, tocolor(r,g,b), 2-(distance/20), "arial", "center", "center") 
                        end 
                end 
        end 
end) 

Link to comment
الكود مش شغال .. :\
addEventHandler("onClientRender", getRootElement(), 
function() 
                                local x, y, z = getElementPosition( pedFarmer ) 
                                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("Farmer Job", sx+2, sy+2, sx, sy, tocolor(r,g,b), 2-(distance/20), "arial", "center", "center") 
                        end 
                end 
        end  
end) 

ممكن فين الخطآ ؟

استبدل element

بــ اسم البيد حقك ..

و استبدل your Text

بالكلام الي تبيه

واستبدل

r,g,b بالون الي تبيه

:)

Link to comment
طيب .. خف علينا يالكبير

ما ثقلت عليك من الأساس ، بس فيه ناس لازم التعامل معهم كذا عشان يفهمون :mrgreen:

Edit:

+ الدي بوق يقول .. ان السطر 5 + 3 فيهم اغلاط .. :mrgreen::mrgreen::mrgreen:

هات الاخطاء الي بالدي بق ..

Edited by Guest
Link to comment

الخطأ طلع لأن اساسا مافيه شي اسمه

pedFarmer

انا حطيته لك

ماعليك الا انك تحط الاحداثيات

وتغير رقم الشخصيه في اول سطر

local pedFarmer = createPed (20, x,y,z) 
  
addEventHandler("onClientRender", root, 
    function() 
       local x, y, z = getElementPosition( pedFarmer ) 
       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("Farmer Job", sx+2, sy+2, sx, sy, tocolor(r,g,b), 2-(distance/20), "arial", "center", "center") 
      end 
    end 
  end 
end 
) 
Link to comment
لوسمحت .. تبى تساعد بآحترام ساعد .. لو ماتبى اتفضل رح ساعد ناس تانى ^^

يلا + مابى مساعدة منك

w h a t t h e f u c k ?????????????

الرجال ساعدك تقوله كذا :?:?

نفسيات اسحب عليهم :lol::lol::lol:

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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