Jump to content

تمت الافادة طلب | ماتركس بزر معين


Recommended Posts

  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

@ 7ASSAN:

function mainFunction() 
        outputChatBox ("Instant text!") 
    setTimer ( function() 
        outputChatBox ( "5 second delay text!" ) 
    end, 5000, 1 ) 
end 
  
mainFunction() --call function 

--

وش يسوي هذا الكود :(

Link to comment
اخواني انا مو قصدي كذا
bindKey("F6","down",Toggle) 

:lol: تضغط عليه يجيك الماتركس login انا قصدي يوم يجيك مود تسجيل الدخول في زر

guiCreateButton 
addEventHandler 
"onClientGUIClick" 

+ الفنكشن الي اعطاك الأخ ذا مساتر

Link to comment
function initGUI( ) 
  
    الزر = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) 
  
  
    addEventHandler ( "onClientGUIClick", btnOutput, outputEditBox, false ) 
  
  
    editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "Type your message here!", true ) 
    guiEditSetMaxLength ( editBox, 128 ) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), initGUI ) 
  
  
function outputEditBox ( button ) 
    if button == "left" then 
        local text = guiGetText ( editBox ) 
        outputChatBox ( text ) 
    end 
end 

function updateCamera () 
    local x, y, z = getElementPosition ( localPlayer ) 
    setCameraMatrix ( x, y, z + 50, x, y, z ) 
end 
addEventHandler ( "onClientRender", root, updateCamera ) 

function setCameraOnPlayerJoin() 
     -- slowly fade the camera in to make the screen visible 
     fadeCamera(source, true, 5) 
     -- set the player's camera to a fixed position, looking at a fixed point 
     setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) 
end 
addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) 

ما عرفت اسويه مع الماتركس

Link to comment
function initGUI( ) 
  
    الزر = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) 
  
  
    addEventHandler ( "onClientGUIClick", btnOutput, outputEditBox, false ) 
  
  
    editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "Type your message here!", true ) 
    guiEditSetMaxLength ( editBox, 128 ) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), initGUI ) 
  
  
function outputEditBox ( button ) 
    if button == "left" then 
        local text = guiGetText ( editBox ) 
        outputChatBox ( text ) 
    end 
end 

function updateCamera () 
    local x, y, z = getElementPosition ( localPlayer ) 
    setCameraMatrix ( x, y, z + 50, x, y, z ) 
end 
addEventHandler ( "onClientRender", root, updateCamera ) 

function setCameraOnPlayerJoin() 
     -- slowly fade the camera in to make the screen visible 
     fadeCamera(source, true, 5) 
     -- set the player's camera to a fixed position, looking at a fixed point 
     setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) 
end 
addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) 

ما عرفت اسويه مع الماتركس

# كوبي بست -_-

Link to comment
function initGUI( ) 
  
    الزر = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) 
  
  
    addEventHandler ( "onClientGUIClick", btnOutput, outputEditBox, false ) 
  
  
    editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "Type your message here!", true ) 
    guiEditSetMaxLength ( editBox, 128 ) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), initGUI ) 
  
  
function outputEditBox ( button ) 
    if button == "left" then 
        local text = guiGetText ( editBox ) 
        outputChatBox ( text ) 
    end 
end 

function updateCamera () 
    local x, y, z = getElementPosition ( localPlayer ) 
    setCameraMatrix ( x, y, z + 50, x, y, z ) 
end 
addEventHandler ( "onClientRender", root, updateCamera ) 

function setCameraOnPlayerJoin() 
     -- slowly fade the camera in to make the screen visible 
     fadeCamera(source, true, 5) 
     -- set the player's camera to a fixed position, looking at a fixed point 
     setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) 
end 
addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) 

ما عرفت اسويه مع الماتركس

# كوبي بست -_-

اجل بست كوبي ؟؟؟

ما تبي تساعد لا تشارك بالموضوع 8)

Link to comment
function initGUI( ) 
  
    الزر = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) 
  
  
    addEventHandler ( "onClientGUIClick", btnOutput, outputEditBox, false ) 
  
  
    editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "Type your message here!", true ) 
    guiEditSetMaxLength ( editBox, 128 ) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), initGUI ) 
  
  
function outputEditBox ( button ) 
    if button == "left" then 
        local text = guiGetText ( editBox ) 
        outputChatBox ( text ) 
    end 
end 

function updateCamera () 
    local x, y, z = getElementPosition ( localPlayer ) 
    setCameraMatrix ( x, y, z + 50, x, y, z ) 
end 
addEventHandler ( "onClientRender", root, updateCamera ) 

function setCameraOnPlayerJoin() 
     -- slowly fade the camera in to make the screen visible 
     fadeCamera(source, true, 5) 
     -- set the player's camera to a fixed position, looking at a fixed point 
     setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) 
end 
addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) 

ما عرفت اسويه مع الماتركس

# كوبي بست -_-

اجل بست كوبي ؟؟؟

ما تبي تساعد لا تشارك بالموضوع 8)

# يخوي انا مااقلك شي كذب ناسخ من الويكي وحاتطهم ومو فهمان شي

function updateCamera () 
    local x, y, z = getElementPosition ( localPlayer ) 
    setCameraMatrix ( x, y, z + 50, x, y, z ) 
end 
addEventHandler ( "onClientRender", root, updateCamera ) 

# , شوف المثال اللي حاطته انت وأضح >

Link to comment

matrix = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Matrix test !", true ) 
  
function updateCamera () 
    local x, y, z = getElementPosition ( localPlayer ) 
    setCameraMatrix ( x, y, z + 50, x, y, z ) 
end 
  
  
addEventHandler ( "onClientGUIClick",matrix, 
function () 
addEventHandler ( "onClientRender", root, updateCamera ) 
end,false) 

مثال بسيط جدا ومفهوم

Link to comment

http://www.gulfup.com/?2jFPpq

اخوي هذا الرابط حق كلنت حقي ممكن تشوفه لي صح ولا غلط

او

    shLogin = guiCreateStaticImage( X + 23, Y + 349, 301, 44, "login.png", true ) 
    addEventHandler("onClientGUIClick",shLogin,onClickBtnLogin) 
    addEventHandler( "onClientMouseEnter",shLogin,LoginSH) 
    addEventHandler("onClientMouseLeave",shLogin,SErem) 
     
    function updateCamera () 
    local x, y, z = getElementPosition ( localPlayer ) 
    setCameraMatrix ( x, y, z + 50, x, y, z ) 
end 
  
  
addEventHandler ( "onClientGUIClick",shLogin, 
function () 
addEventHandler ( "onClientRender", root, updateCamera ) 
end,false) 
     
    local sm = {} 
sm.moov = 0 
sm.object1, sm.object2 = nil, nil 
  
local function removeCamHandler () 
    if(sm.moov == 1) then 
        sm.moov = 0 
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) 
    end 
end 
  
local function camRender () 
    local x1, y1, z1 = getElementPosition ( sm.object1 ) 
    local x2, y2, z2 = getElementPosition ( sm.object2 ) 
    setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) 
end 
  
function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, 10000 ) 
    if(sm.moov == 1) then return false end 
    sm.object1 = createObject ( 1337, x1, y1, z1 ) 
    sm.object2 = createObject ( 1337, x1t, y1t, z1t ) 
    setElementAlpha ( sm.object1, 0 ) 
    setElementAlpha ( sm.object2, 0 ) 
    setObjectScale(sm.object1, 0.01) 
    setObjectScale(sm.object2, 0.01) 
    moveObject ( sm.object1, 10000, x2, y2, z2, 0, 0, 0, "InOutQuad" ) 
    moveObject ( sm.object2, 10000, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) 
  
    addEventHandler ( "onClientPreRender", getRootElement(), camRender ) 
    sm.moov = 1 
    setTimer ( removeCamHandler, 10000, 1 ) 
    setTimer ( destroyElement, 10000, 1, sm.object1 ) 
    setTimer ( destroyElement, 10000, 1, sm.object2 ) 
    return true 
end 

Link to comment
http://www.gulfup.com/?2jFPpq

اخوي هذا الرابط حق كلنت حقي ممكن تشوفه لي صح ولا غلط

او

    shLogin = guiCreateStaticImage( X + 23, Y + 349, 301, 44, "login.png", true ) 
    addEventHandler("onClientGUIClick",shLogin,onClickBtnLogin) 
    addEventHandler( "onClientMouseEnter",shLogin,LoginSH) 
    addEventHandler("onClientMouseLeave",shLogin,SErem) 
     
    function updateCamera () 
    local x, y, z = getElementPosition ( localPlayer ) 
    setCameraMatrix ( x, y, z + 50, x, y, z ) 
end 
  
  
addEventHandler ( "onClientGUIClick",shLogin, 
function () 
addEventHandler ( "onClientRender", root, updateCamera ) 
end,false) 
     
    local sm = {} 
sm.moov = 0 
sm.object1, sm.object2 = nil, nil 
  
local function removeCamHandler () 
    if(sm.moov == 1) then 
        sm.moov = 0 
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) 
    end 
end 
  
local function camRender () 
    local x1, y1, z1 = getElementPosition ( sm.object1 ) 
    local x2, y2, z2 = getElementPosition ( sm.object2 ) 
    setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) 
end 
  
function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, 10000 ) 
    if(sm.moov == 1) then return false end 
    sm.object1 = createObject ( 1337, x1, y1, z1 ) 
    sm.object2 = createObject ( 1337, x1t, y1t, z1t ) 
    setElementAlpha ( sm.object1, 0 ) 
    setElementAlpha ( sm.object2, 0 ) 
    setObjectScale(sm.object1, 0.01) 
    setObjectScale(sm.object2, 0.01) 
    moveObject ( sm.object1, 10000, x2, y2, z2, 0, 0, 0, "InOutQuad" ) 
    moveObject ( sm.object2, 10000, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) 
  
    addEventHandler ( "onClientPreRender", getRootElement(), camRender ) 
    sm.moov = 1 
    setTimer ( removeCamHandler, 10000, 1 ) 
    setTimer ( destroyElement, 10000, 1, sm.object1 ) 
    setTimer ( destroyElement, 10000, 1, sm.object2 ) 
    return true 
end 

جربه وشف

Link to comment
:cry: طيب اخوي انا حاولت وعجزت

زر = سطر 1و2و3و4

قول وش تبي بالضبط والسطور هذي الي تقول انها ازرار هي مو ازرار هذي اضافة احداث

تضيف بعضهم لفنكشن مهو موجود ناسخهم من مكان ثاني وحطيتهم فيه

اول شيء راجع الموضوع كله وشوف الردود وكذا وبعدين حاول اذا ماقدرت قل وش تبي بالضبط ..

Link to comment

طيب اخوي ابو شنب ضفت الوظائف والفنكشن الي عطيتني صح كذا ؟؟

    shLogin = guiCreateStaticImage( X + 23, Y + 349, 301, 44, "login.png", true ) 
    addEventHandler("onClientGUIClick",shLogin,onClickBtnLogin) 
    addEventHandler( "onClientMouseEnter",shLogin,LoginSH) 
    addEventHandler("onClientMouseLeave",shLogin,SErem) 
     
    function updateCamera () 
    local x, y, z = getElementPosition ( localPlayer ) 
    setCameraMatrix ( x, y, z + 50, x, y, z ) 
end 
  
    function SHrem () --- هنا وضعت فنكشن 
    function LoginSH () --- هنا وضعت فنكشن 
    function onClickBtnLogin ()--- هنا وضعت الفنكشن 
    X , Y , Z= guiGetScreenSize () ------- هنا وضعت الوظيفة 
  
addEventHandler ( "onClientGUIClick",shLogin, 
function () 
addEventHandler ( "onClientRender", root, updateCamera ) 
end,false) 
     
    local sm = {} 
sm.moov = 0 
sm.object1, sm.object2 = nil, nil 
  
local function removeCamHandler () 
    if(sm.moov == 1) then 
        sm.moov = 0 
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) 
    end 
end 
  
local function camRender () 
    local x1, y1, z1 = getElementPosition ( sm.object1 ) 
    local x2, y2, z2 = getElementPosition ( sm.object2 ) 
    setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) 
end 
  
function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, 10000 ) 
    if(sm.moov == 1) then return false end 
    sm.object1 = createObject ( 1337, x1, y1, z1 ) 
    sm.object2 = createObject ( 1337, x1t, y1t, z1t ) 
    setElementAlpha ( sm.object1, 0 ) 
    setElementAlpha ( sm.object2, 0 ) 
    setObjectScale(sm.object1, 0.01) 
    setObjectScale(sm.object2, 0.01) 
    moveObject ( sm.object1, 10000, x2, y2, z2, 0, 0, 0, "InOutQuad" ) 
    moveObject ( sm.object2, 10000, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" ) 
  
    addEventHandler ( "onClientPreRender", getRootElement(), camRender ) 
    sm.moov = 1 
    setTimer ( removeCamHandler, 10000, 1 ) 
    setTimer ( destroyElement, 10000, 1, sm.object1 ) 
    setTimer ( destroyElement, 10000, 1, sm.object2 ) 
    return true 
end 

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

والمبرمج مو يولد وعلى طول مبرمج

Edited by Guest
Link to comment

addEventHandler("onClientGUIClick",shLogin,onClickBtnLogin) 
addEventHandler( "onClientMouseEnter",shLogin,LoginSH) 
addEventHandler("onClientMouseLeave",shLogin,SErem) 

ما لها اي فايده ابدأ,

shLogin هذا اسم الصورة وهو صحيح ,

ولكن مافي فنكشنات للايفنتات,

+ وش تبي تسوي؟

Edited by Guest
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...