Jump to content

طلب كود


Mhmd.z

Recommended Posts

عرفت اسويه شكرا :lol:

لكن كيف اخليه يشيلها ؟

local screenWidth, screenHeight = guiGetScreenSize ( ) -- Get the screen resolution (width and height) 
  
function createText ( ) 
    local playerX, playerY, playerZ = getElementPosition ( localPlayer )       -- Get our player's coordinates. 
    local playerZoneName = getZoneName ( playerX, playerY, playerZ )          -- Get name of the zone the player is in. 
  
    -- Draw zone name text's shadow. 
    dxDrawText ( playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
    -- Draw zone name text. 
    dxDrawText ( playerZoneName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" )  
end 
  
function HandleTheRendering ( ) 
    addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender. 
end 
 bindKey("f2", "down", HandleTheRendering) 
  
  

Edited by Guest
Link to comment
function show() 
if removeEventHandler( "onClientRender" , root, DX)then -- DX استبدله بالدي اكس اللي تبيه 
removeEventHandler( "onClientRender" , root, DX) -- نفس الشي 
showCursor( false )  
else 
addEventHandler( "onClientRender" , root, DX) -- نفس الشي 
showCursor( true ) 
    end 
    end 
bindKey ( "key", "down", show ) -- key استبدله بزر فتح اللوحة 

Link to comment
function show() 
if removeEventHandler( "onClientRender" , root, DX)then -- اذا كان الايفينت محذوف 
removeEventHandler( "onClientRender" , root, DX) -- يحذفه مرة ثانية 
showCursor( false )  
else -- اذا ماكان الايفينت محذوف يعني اذا كان موجود 
addEventHandler( "onClientRender" , root, DX) -- يحطه مرة ثانية  
showCursor( true ) 
    end 
    end 
bindKey ( "key", "down", show ) -- key استبدله بزر فتح اللوحة 

:bazooka::bazooka::bazooka::bazooka::bazooka:

Link to comment
تتكلممو جد انتم ؟ ابيه لما يضغط زر يجيك الدي اكس , لو ضغطه كمان مره تروح الدي اكس , انت حاطلي ماوس , اضغط كمان مره الزر ما يروح !

أنا حاط لك وظيفة أظهار الماوس مثل ما أنت طلبت :wink:

Link to comment
function DX() 
-- هنا تحط اكواد الدي اكس اللي تبيها تظهر  
-- IMAGE , RECTANGLE , ... etc  
end 
  
function show() 
if removeEventHandler( "onClientRender" , root, DX)then -- اذا كان الايفينت محذوف 
removeEventHandler( "onClientRender" , root, DX) -- يحذفه مرة ثانية 
showCursor( false ) 
else -- اذا ماكان الايفينت محذوف يعني اذا كان موجود 
addEventHandler( "onClientRender" , root, DX) -- يحطه مرة ثانية 
showCursor( true ) 
    end 
    end 
bindKey ( "key", "down", show ) -- key استبدله بزر فتح اللوحة 
  

Link to comment
تتكلممو جد انتم ؟ ابيه لما يضغط زر يجيك الدي اكس , لو ضغطه كمان مره تروح الدي اكس , انت حاطلي ماوس , اضغط كمان مره الزر ما يروح !

function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) 
    if  
        type( sEventName ) == 'string' and  
        isElement( pElementAttachedTo ) and  
        type( func ) == 'function'  
    then 
        local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) 
        if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then 
            for i, v in ipairs( aAttachedFunctions ) do 
                if v == func then 
                    return true 
                end 
            end 
        end 
    end 
  
    return false 
end 
  
addEventHandler("onClientGUIClick",root, 
function() 
if ( source == أسم الزر ) then 
if isEventHandlerAdded( 'onClientRender', root,أسم وظيفة الدي أكس) then 
removeEventHandler( 'onClientRender', root, أسم وظيفة الدي أكس) 
showCursor(false) 
else 
addEventHandler( 'onClientRender', root, أسم وظيفة الدي أكس) 
showCursor(true) 
          end 
     end 
end 
) 
Link to comment
تتكلممو جد انتم ؟ ابيه لما يضغط زر يجيك الدي اكس , لو ضغطه كمان مره تروح الدي اكس , انت حاطلي ماوس , اضغط كمان مره الزر ما يروح !

function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) 
    if  
        type( sEventName ) == 'string' and  
        isElement( pElementAttachedTo ) and  
        type( func ) == 'function'  
    then 
        local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) 
        if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then 
            for i, v in ipairs( aAttachedFunctions ) do 
                if v == func then 
                    return true 
                end 
            end 
        end 
    end 
  
    return false 
end 
  
addEventHandler("onClientGUIClick",root, 
function() 
if ( source == أسم الزر ) then 
if isEventHandlerAdded( 'onClientRender', root,أسم وظيفة الدي أكس) then 
removeEventHandler( 'onClientRender', root, أسم وظيفة الدي أكس) 
showCursor(false) 
else 
addEventHandler( 'onClientRender', root, أسم وظيفة الدي أكس) 
showCursor(true) 
          end 
     end 
end 
) 

ههههههه , هو مايقصد كذا ... هو يبي لو ضغط زر يفتح له نفس اللوحة يعني مثلا لو ضغط اف 5 يفتح له الدي اكس اللي يبيه

:lol::lol:

بس الظاهر مافهم الكود :P

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