Jump to content

فنكشن xX[تصحيح]Xx


Recommended Posts

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

شباب انا مسوي فوق الاعب الي معه داتا يجي فوق اسمه كلام بس المشكله لما يبعد عنه الكلام مايروح !!

الاكواد

addEventHandler("onClientRender", getRootElement(),  
function() 
        for i, player in ipairs(getElementsByType("player")) do 
        if getElementData(player, "ArmsDealerF") == true    then 
 local x, y, z = getElementPosition(player) 
  local x2, y2, z2 = getElementPosition(player) 
if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then 
    local sx, sy = getScreenFromWorldPosition(x, y, z+1) 
     if(sx) and (sy) then 
     local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) -- 
      if(distance < 30) then 
       dxDrawText("if u want to buy Press 'B'", sx+2, sy+2, sx, sy, tocolor(255, 0, 0, 255), 2-(distance/20), "arial", "center", "center") 
       dxDrawText("if u want to buy Press 'B'", sx, sy, sx, sy, tocolor(255, 0, 0, 255), 2-(distance/20), "arial", "center", "center") 
end 
end    
   end 
   end 
 end 
end)  

Link to comment
السلام عليكم و رحمة هالله و بركاته

شباب انا مسوي فوق الاعب الي معه داتا يجي فوق اسمه كلام بس المشكله لما يبعد عنه الكلام مايروح !!

الاكواد

addEventHandler("onClientRender", getRootElement(),  
function() 
        for i, player in ipairs(getElementsByType("player")) do 
        if getElementData(player, "ArmsDealerF") == true    then 
 local x, y, z = getElementPosition(player) 
  local x2, y2, z2 = getElementPosition(player) 
if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then 
    local sx, sy = getScreenFromWorldPosition(x, y, z+1) 
     if(sx) and (sy) then 
     local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) -- 
      if(distance < 30) then 
       dxDrawText("if u want to buy Press 'B'", sx+2, sy+2, sx, sy, tocolor(255, 0, 0, 255), 2-(distance/20), "arial", "center", "center") 
       dxDrawText("if u want to buy Press 'B'", sx, sy, sx, sy, tocolor(255, 0, 0, 255), 2-(distance/20), "arial", "center", "center") 
end 
end    
   end 
   end 
 end 
end)  

سطر 6 غيره الي

local x2, y2, z2 = getElementPosition(localPlayer) 
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...