Jump to content

طلب ؟


Recommended Posts

ابي الكود او المود

اللي مثلا:

سويت ماركر سيارات تدخل تاخذ سياره المهم

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

سيارات اسطورة الـ زومبي

Link to comment
--[[ 
  
// DX 3D Texts By : 彡ṔĄ!И ( version : 1.0 ) 
/ Script : client.lua 
--------------------------------------------- 
// Visit Us At : [url=http://www.Gta-Arabs.net]http://www.Gta-Arabs.net[/url] ^^ 
  
--]] 
  
-- making a table with allowed fonts' names 
local fonts = { [ "default" ] = true, [ "default-bold" ] = true,[ "clear" ] = true,[ "arial" ] = true,[ "sans" ] = true, 
      [ "pricedown" ] = true, [ "bankgothic" ] = true,[ "diploma" ] = true,[ "beckett" ] = true 
}; 
  
function dxDraw3DText( text, x, y, z, scale, font, r, g, b, maxDistance ) 
    -- checking required arguments 
    assert( type( text ) == "string", "Bad argument @ dxDraw3DText" ); 
    assert( type( x ) == "number", "Bad argument @ dxDraw3DText" ); 
    assert( type( y ) == "number", "Bad argument @ dxDraw3DText" ); 
    assert( type( z ) == "number", "Bad argument @ dxDraw3DText" ); 
    -- checking optional arguments 
    if not scale or type( scale ) ~= "number" or scale <= 0 then 
        scale = 2 
    end 
    if not font or type( font ) ~= "string" or not fonts[ font ] then 
        font = "default" 
    end 
    if not r or type( r ) ~= "number" or r < 0 or r > 255 then 
        r = 255 
    end 
    if not g or type( g ) ~= "number" or g < 0 or g > 255 then 
        g = 255 
    end 
    if not b or type( b ) ~= "number" or b < 0 or b > 255 then 
        b = 255 
    end 
    if not maxDistance or type( maxDistance ) ~= "number" or maxDistance <= 1 then 
        maxDistance = 12 
    end 
    local textElement = createElement( "text" ); 
    -- checking if the element was created 
    if textElement then  
        -- setting the element datas 
        setElementData( textElement, "text", text ); 
        setElementData( textElement, "x", x ); 
        setElementData( textElement, "y", y ); 
        setElementData( textElement, "z", z ); 
        setElementData( textElement, "scale", scale ); 
        setElementData( textElement, "font", font ); 
        setElementData( textElement, "rgba", { r, g, b, 255 } ); 
        setElementData( textElement, "maxDistance", maxDistance ); 
        -- returning the text element 
        return textElement 
    end 
    -- returning false in case of errors 
    return false 
end 
  
addEventHandler( "onClientRender", root, 
    function( ) 
        local texts = getElementsByType( "text" ); 
        if #texts > 0 then 
            local pX, pY, pZ = getElementPosition( localPlayer ); 
            for i = 1, #texts do 
                local text = getElementData( texts[i], "text" ); 
                local tX, tY, tZ = getElementData( texts[i], "x" ), getElementData( texts[i], "y" ), getElementData( texts[i], "z" ); 
                local font = getElementData( texts[i], "font" ); 
                local scale = getElementData( texts[i], "scale" ); 
                local color = getElementData( texts[i], "rgba" ); 
                local maxDistance = getElementData( texts[i], "maxDistance" ); 
                if not text or not tX or not tY or not tZ then 
                    return 
                end 
                if not font then font = "default" end 
                if not scale then scale = 2 end 
                if not color or type( color ) ~= "table" then 
                    color = { 255, 255, 255, 255 }; 
                end 
                if not maxDistance then maxDistance = 12 end 
                local distance = getDistanceBetweenPoints3D( pX, pY, pZ, tX, tY, tZ ); 
                if distance <= maxDistance then 
                    local x, y = getScreenFromWorldPosition( tX, tY, tZ ); 
                    if x and y then 
                        dxDrawText( text, x, y, _, _, tocolor( color[1], color[2], color[3], color[4] ), scale, font, "center", "center" ); 
                    end 
                end 
            end 
        end 
    end 
); 

سوو لي مثال

Link to comment

تفضل

function renderIng( ) 
local x, y, z = getCameraMatrix( ) 
local dimension = getElementDimension( localPlayer ) 
for key, marker in ipairs ( getElementsByType( "marker", resourceRoot ) ) do 
if getElementDimension( marker ) == dimension then 
local px, py, pz = getElementPosition( marker ) 
local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) 
if distance <= 50 then 
local text = getElementData( marker, "message" )     
if text and ( distance < 3 or isLineOfSightClear( x, y, z, px, py, pz + 1.7, true, true, true, true, false, false, true, localPlayer ) ) then 
local sx, sy = getScreenFromWorldPosition( px, py, pz + 1.7 ) 
if sx and sy then 
local w = dxGetTextWidth( tostring( text ) ) 
local h = ( text and 3 or 1 ) * dxGetFontHeight( ) 
  
dxDrawText( tostring( text ), sx, sy, sx, sy, tocolor( 255, 255, 255, 255 ), 4, "Tahoma", "center", "center" ) 
end 
end 
end 
end 
end 
end 
addEventHandler( "onClientRender", getRootElement( ),renderIng) 
  
  
  
Marker = createMarker ( x, y, z, "cylinder", s, r, g, b, a ) 
setElementData(Marker,"message","الكتابة") 
  

الأستبدال

سطر 27

أحداثيات الماركر

سطر 28

الكتابة

Link to comment
local dxDraw3DText = exports.3D_DX_Texts:dxDraw3DText 
local x,y,z = 225.39700317383, 1921.7197265625, 19.9935131073 
local r,g,b = 255,0,0  
  
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), 
  function( ) 
        dxDraw3DText( "> سيارات اسطورة الـ زومبي" ,x, y, z , 2, "default", r, b, g ) 
       end 
) 

حمل المود اللي عطوك فوق وشغله وخلة نفس اسمة بدون تعديل وحط الكود بمود ثاني ملف كلنت وشغله وجربة.

Link to comment

ما طلع اي شي حطيت في ملف client

    local dxDraw3DText = exports.3D_DX_Texts:dxDraw3DText 
    addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), 
      function( ) 
            dxDraw3DText( "سيارات اسطورة الـ زومبي" ,225.39700317383, 1921.7197265625, 19.9935131073 , 2, "default", 255, 255, 255 ) 
           end 
    ) 

والملف حق المود

--[[ 
  
// DX 3D Texts By : 彡ṔĄ!И ( version : 1.0 ) 
/ Script : client.lua 
--------------------------------------------- 
// Visit Us At : [url=http://www.Gta-Arabs.net]http://www.Gta-Arabs.net[/url] ^^ 
  
--]] 
  
-- making a table with allowed fonts' names 
local fonts = { [ "default" ] = true, [ "default-bold" ] = true,[ "clear" ] = true,[ "arial" ] = true,[ "sans" ] = true, 
      [ "pricedown" ] = true, [ "bankgothic" ] = true,[ "diploma" ] = true,[ "beckett" ] = true 
}; 
  
function dxDraw3DText( text, x, y, z, scale, font, r, g, b, maxDistance ) 
    -- checking required arguments 
    assert( type( text ) == "string", "Bad argument @ dxDraw3DText" ); 
    assert( type( x ) == "number", "Bad argument @ dxDraw3DText" ); 
    assert( type( y ) == "number", "Bad argument @ dxDraw3DText" ); 
    assert( type( z ) == "number", "Bad argument @ dxDraw3DText" ); 
    -- checking optional arguments 
    if not scale or type( scale ) ~= "number" or scale <= 0 then 
        scale = 2 
    end 
    if not font or type( font ) ~= "string" or not fonts[ font ] then 
        font = "default" 
    end 
    if not r or type( r ) ~= "number" or r < 0 or r > 255 then 
        r = 255 
    end 
    if not g or type( g ) ~= "number" or g < 0 or g > 255 then 
        g = 255 
    end 
    if not b or type( b ) ~= "number" or b < 0 or b > 255 then 
        b = 255 
    end 
    if not maxDistance or type( maxDistance ) ~= "number" or maxDistance <= 1 then 
        maxDistance = 12 
    end 
    local textElement = createElement( "text" ); 
    -- checking if the element was created 
    if textElement then  
        -- setting the element datas 
        setElementData( textElement, "text", text ); 
        setElementData( textElement, "x", x ); 
        setElementData( textElement, "y", y ); 
        setElementData( textElement, "z", z ); 
        setElementData( textElement, "scale", scale ); 
        setElementData( textElement, "font", font ); 
        setElementData( textElement, "rgba", { r, g, b, 255 } ); 
        setElementData( textElement, "maxDistance", maxDistance ); 
        -- returning the text element 
        return textElement 
    end 
    -- returning false in case of errors 
    return false 
end 
  
addEventHandler( "onClientRender", root, 
    function( ) 
        local texts = getElementsByType( "text" ); 
        if #texts > 0 then 
            local pX, pY, pZ = getElementPosition( localPlayer ); 
            for i = 1, #texts do 
                local text = getElementData( texts[i], "text" ); 
                local tX, tY, tZ = getElementData( texts[i], "x" ), getElementData( texts[i], "y" ), getElementData( texts[i], "z" ); 
                local font = getElementData( texts[i], "font" ); 
                local scale = getElementData( texts[i], "scale" ); 
                local color = getElementData( texts[i], "rgba" ); 
                local maxDistance = getElementData( texts[i], "maxDistance" ); 
                if not text or not tX or not tY or not tZ then 
                    return 
                end 
                if not font then font = "default" end 
                if not scale then scale = 2 end 
                if not color or type( color ) ~= "table" then 
                    color = { 255, 255, 255, 255 }; 
                end 
                if not maxDistance then maxDistance = 12 end 
                local distance = getDistanceBetweenPoints3D( pX, pY, pZ, tX, tY, tZ ); 
                if distance <= maxDistance then 
                    local x, y = getScreenFromWorldPosition( tX, tY, tZ ); 
                    if x and y then 
                        dxDrawText( text, x, y, _, _, tocolor( color[1], color[2], color[3], color[4] ), scale, font, "center", "center" ); 
                    end 
                end 
            end 
        end 
    end 
); 
  
  

وما ضبط والحل؟

Link to comment

تفضل

function renderIng( ) 
local x, y, z = getCameraMatrix( ) 
local dimension = getElementDimension( localPlayer ) 
for key, marker in ipairs ( getElementsByType( "marker", resourceRoot ) ) do 
if getElementDimension( marker ) == dimension then 
local px, py, pz = getElementPosition( marker ) 
local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) 
if distance <= 50 then 
local text = getElementData( marker, "message" )     
if text and ( distance < 3 or isLineOfSightClear( x, y, z, px, py, pz + 1.7, true, true, true, true, false, false, true, localPlayer ) ) then 
local sx, sy = getScreenFromWorldPosition( px, py, pz + 1.7 ) 
if sx and sy then 
local w = dxGetTextWidth( tostring( text ) ) 
local h = ( text and 3 or 1 ) * dxGetFontHeight( ) 
  
dxDrawText( tostring( text ), sx, sy, sx, sy, tocolor( 255, 255, 255, 255 ), 4, "Tahoma", "center", "center" ) 
end 
end 
end 
end 
end 
end 
addEventHandler( "onClientRender", getRootElement( ),renderIng) 
  
  
  
Marker = createMarker ( 225.39700317383, 1921.7197265625, 19.9935131073, "cylinder", 1, 0, 0, 0, 0 ) 
setElementData(Marker,"message",سيارات اسطورة الـ زومبي") 
  
 

الأستبدال

سطر 27

أحداثيات الماركر

سطر 28

الكتابة

جرب هذا عدلتة بحيث يكون الماركر مخفي وأنت بس بدل أحداثيات الماركر أوكي

ملاحظة

>>>الماركر مخفي <<<

Link to comment
  
createMarker(225.39700317383, 1921.7197265625, 16.640625, "cylinder", 1.5, 255, 0, 0, 255 ) 
local x,y,z = 225.39700317383, 1921.7197265625, 17.9935131073 
local r,g,b = 255,0,0 
  
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), 
  function( ) 
        exports[ "3D_DX_Texts" ]:dxDraw3DText( "> سيارات اسطورة الـ زومبي" ,x, y, z , 2, "default", r, b, g ) 
       end 
) 

جرب <3

ولاتنسى تشغل مود

3D_DX_Texts

Link to comment
  
createMarker(225.39700317383, 1921.7197265625, 16.640625, "cylinder", 1.5, 255, 0, 0, 255 ) 
local x,y,z = 225.39700317383, 1921.7197265625, 17.9935131073 
local r,g,b = 255,0,0 
  
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), 
  function( ) 
        exports[ "3D_DX_Texts" ]:dxDraw3DText( "> سيارات اسطورة الـ زومبي" ,x, y, z , 2, "default", r, b, g ) 
       end 
) 

جرب <3

ولاتنسى تشغل مود

3D_DX_Texts

getResourceRootElement( getThisResource( ) = resourceRoot

اختصر اكوادك ولا كوبي بست

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