Jump to content

Mr.Hugin

Members
  • Posts

    169
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Mr.Hugin

  1. 10 hours ago, MouNiR.Dz said:

    شوف اول شي كفوو عليك يعني على الفكرة لآن نادرا ما واحد يحاول يسويها و ينشرها

    الطريقة يلي انت قفلت بيها التاب فعالة لكن عندها آثار آخرى
    فـ كذا انت طفيت اي تاب مش فقط حق التكتيك ( ماعدا مود التاب الأصلي يلي غالبا مايجي من الام تي اي )

    انت ماوضحت لأي مبرمج من الممكن ان يستفيد من السكريبت حقك انو لازم يضيف أمر scoreboard
    لسكريبت التاب حقه لو يبي يصنع

    وشكرا 
    ❤️

    مش لازم اوضح  مفهوم السكربت  بعدين تقدر تاخذ الملف وتحطه في كلنت داخل مود التكتيك وبكذا مارح يقفل كل التابات بطريقة يلي تقوله اذا كان اشخص مبرمج رح يعرف هاذا الشي واي احد ما فهم طريقة المود يشرفني وانا بفهمه كل شي  واهلا وسهلا  نورت الموضوع

  2. On 07/01/2023 at 14:33, Jamal1273s said:

    السلام عليكم عندي مشكلة انا مسوي لوحة اتش تي ام ال وحاطت فيها اموال اللاعب واسمه والايدي وهذول الاشياء المشكلة الاولى هي اني اول مابفتح السيرفر وبفتح اللوحة اللوحة بتفتح بس مابيطلعلي اموال اللاعب والايدي باختصار الفنكشن مابتتفعل لحتى مااعمل رستارت للوحة كاملة والمشكلة الثانية هي ان بعد مايظهروا الاموال وهذول وقت بيجيني انا مصاري مابيتحدثوا داخل اللوحة بيبقا العدد على الاموال القديمات بس اعمل رستارت بيجيبلي المصاري يلي معي بس بعد ما اعمل رستارت انا بدي يجيبلي المصاري فورا بدون ما اعمل رستارت ويطلعوا الاموال والايدي والاسم فورا اول مابفتح اللوحة بدون مااعمل رستارت 

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

    local screenWidth, screenHeight = guiGetScreenSize()

     

    local page1 = "http://mta/local/index.html"

     

    local initBrowser1 = guiCreateBrowser(0 ,0,screenWidth,screenHeight,true,true,false);

    local theBrowser1 = guiGetBrowser(initBrowser1)

    local browser = initBrowser1;

     

    addEventHandler("onClientBrowserDocumentReady", browser,

        function ()

       

            executeBrowserJavascript(source, "document.getElementById('money').innerHTML = '" .. getElementData(localPlayer,"money") .. "';")

            executeBrowserJavascript(source, "document.getElementById('id').innerHTML = '" .. getElementData(localPlayer,"playerid") .. "';")

            executeBrowserJavascript(source, "document.getElementById('name').innerHTML = '" .. getPlayerName(localPlayer) .. "';")

            executeBrowserJavascript(source, "document.getElementById('time').innerHTML = '" .. getElementData(localPlayer, "hoursplayed") .."';")

            executeBrowserJavascript(source, "document.getElementById('age').innerHTML = '" .. getElementData(localPlayer,"age") .. "';")

            executeBrowserJavascript(source, "document.getElementById('bank').innerHTML = '" .. getElementData(localPlayer,"bankmoney") .. "';")

        end)

       

    setTimer(function()

    guiGetBrowser(browser)

     

    end, 5000, 0);

    addEventHandler("onClientBrowserCreated", browser,

        function ()

            loadBrowserURL(source, "http://mta/local/index.html") --Containing <span id="nick"></span> somewhere in the file

        end)

     

    --The page has to load first

     

    addEventHandler( "onClientBrowserCreated",theBrowser1,

     

    function ()

        loadBrowserURL( source, page1 )

     

    end

     

     

     

     

    )

    guiSetVisible( initBrowser1, false)

     

    -- هون فتح اللوحة وقفلها    

    function Open( )

    opsite = not guiGetVisible(initBrowser1)

    guiSetVisible(initBrowser1,opsite)

     

    showCursor(opsite)

     

    end

    bindKey("F1","down",Open)

     

    local screenW, screenH = guiGetScreenSize()

     

       

     

    function disa()

        outputChatBox("تم نسخ الرابط",255 ,215 ,0)    

            setClipboard("https://discord.gg/5M6ZzRennZ")

        end

        addEvent("disa",true)

        addEventHandler("disa",resourceRoot,disa)

     

     

     

     

     

     

    المشكله مارح نقدر نساعدك كذا لازم نشوف لكلنت كامل مو بس جزء منه وما بعرف انته صانع لوحة وين لوحة لأن مانقدر نحكم كذا او نعرف واذا بدك اني اساعدك ممكن تيجيني دسكورد 

    Mr.Hugin#2764

  3. On 03/01/2023 at 16:31, jamalgoving said:

    السلام عليكم انا عامل لوحة 

    F1

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

    اذاتقدر اطرح الكود

  4. 9 hours ago, Avir14 said:

    طيب وكيف اربطهم ببعض لما يضغط الزر يسوي التريقر

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

    --------
    local screenW, screenH = guiGetScreenSize()
    --------
    stickerwnd = guiCreateWindow((screenW - 462) / 2, (screenH - 319) / 2, 462, 319, "photo sender", false)
        guiWindowSetSizable(stickerwnd, false)
        guiSetProperty(stickerwnd, "CaptionColour", "FF1BEB00")
        guiSetVisible(stickerwnd, false)
        photo1 = guiCreateStaticImage(23, 33, 109, 91, "هنا اسم صوره.png", false, stickerwnd)    
    --------
    bool = false
    --------
    function aaw()
    	if bool == true then
    	dxDrawImage(619, 295, 408, 467, "وهنا كمان اسم الصوره.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    end 
    end
    --------
    function Open()
    	if (guiGetVisible(stickerwnd) == true) then
    		guiSetVisible(stickerwnd, false)
    		showCursor(false)
    	elseif (guiGetVisible() == false) then
    		guiSetVisible(stickerwnd, true)
    		showCursor(true)
    	end
    end
    addCommandHandler("testimage", Open)
    --------
    addEventHandler("onClientGUIClick", root, 
    	function()
    		bool = not bool
    		if source == photo1 then
    			addEventHandler("onClientRender", root, aaw)
    		else 
    			removeEventHandler("onClientRender", root, aaw)
    	end
    end)

     بهاذا شكل رح تقدر لمن  تكتوب في اف 8 

    testimage

    رح يضهر لك الوحة واذا كبست علي الزر يلي في لوحة رح يضهر لك يلي هي صوره واذا ضغط الزر مره ثانيه رح يخفي لك الصوره 

    واذا بدك تضيف تايمر تقدر علي نفس الزر تضيف عادي

  5. 1 hour ago, Avir14 said:

    ابي اللاعب لما يضغغط الزر الصوره تظهر للجميع 

    debugscript : WARNING: Image\c.lua:20: Bad argument @ 'addEventHandler' [Expected function at
    argument 3, got boolean]

    --Client 
    
    addEventHandler("onClientResourceStart", resourceRoot,
        function()
    local screenW, screenH = guiGetScreenSize()
            stickerwnd = guiCreateWindow((screenW - 462) / 2, (screenH - 319) / 2, 462, 319, "photo sender", false)
            guiWindowSetSizable(stickerwnd, false)
            guiSetProperty(stickerwnd, "CaptionColour", "FF1BEB00")
    
            photo1 = guiCreateStaticImage(23, 33, 109, 91, ":Image/photo.png", false, stickerwnd)    
        end
    )
    
        function aaw()
       dxDrawImage(619, 295, 408, 467, "photo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        end
    
    
    
    
    addEvent( "sso", true )
    addEventHandler( "sso", getRootElement(), 
    addEventHandler ('onClientGUIClick' , root , 
        function ()
    if source == photo1 then
    		addEventHandler("onClientRender", getRootElement(), aaw)
    function Chat ( text )
    	removeEventHandler("onClientRender", getRootElement(), aaw)
    end
    setTimer ( delayedChat, 4000, 1, "send" )
    end
    end
    )
    )
    
    --Server
    
     function texte (thePlayer)
    setElementData ( source , "tex", true )
    if getElementData ( source ,"tex") ==  true then
    	triggerClientEvent("sso", getRootElement())
    outputChatBox ("done")
    end
    end

    مساعده لو سمحتم

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

    ----------
    bool = false
    ----------
    function ImagePlayer ()
        if bool == true then
        dxDrawImage(483, 277, 404, 115, "هنا اسم الصوره.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        end
    end
    ----------
    addCommandHandler("testimage",
        function()
            bool = not bool
            if addEventHandler("onClientRender", root, ImagePlayer) then
                addEventHandler("onClientRender", root, ImagePlayer)
            else
                removeEventHandler("onClientRender", root, ImagePlayer)
        end
    end)

    كذا طبعن لمن تكتب في اف 8 testimage

    رح تضهر لك الصوره واذا بدك تقفل الصوره تكتب نفس الكلمه رح تقفل

    واذا تقصد تسوي لوحة واذا ضغط علي زر تضهر لجميع الاعبين لازم تسوي امر اذا لاعب ضغط علي زر يضهر لجميع صوره يلي انته محددها

  6. 17 hours ago, Avir14 said:

    ابي الصوره تظهر للكل اذا كتبت كوماند بس مو شغال والديبق مايطلع اشي

    --Client
        function aaw()
       dxDrawImage(619, 295, 408, 467, ":guieditor/client/colorpicker/palette.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        end
    addEvent( "sso", true )
    addEventHandler( "sso", getRootElement(), 
        function ()
    		addEventHandler("onClientRender", getRootElement(), aaw)
    end
    )
    
    --Server
    
    function texte ()
    setElementData ( source , "tEX", true )
    if getElementData ( source ,"tEX") ==  true then
    	triggerClientEvent("sso", getRootElement())
    outputChatBox ("done")
    addCommandHandler("text", texte);
    end
    end

    حل لوسمحتم

    طيب مفروض انك تكون حاط صوره 

    --Client
        function aaw()
       dxDrawImage(619, 295, 408, 467, ":guieditor/client/colorpicker/palette.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) -- مفروض تحط صوره وتحط اسمها في ""
        end
    addEvent( "sso", true )
    addEventHandler( "sso", getRootElement(), 
        function ()
    		addEventHandler("onClientRender", getRootElement(), aaw)
    end
    )
    
    --Server
    
    function texte ()
    setElementData ( source , "tEX", true )
    if getElementData ( source ,"tEX") ==  true then
    	triggerClientEvent("sso", getRootElement())
    outputChatBox ("done")
    end
    end
    addCommandHandler("text", texte)

    ولازم تسوي ميتا وتحط فيها اسم السيرفر وكلنت و صوره يلي انته بدك تضهر

    <meta>
      <script src="Client.lua" type="client" cache="false"/>
      <script src="Server.lua" type="server"/>
      <file src="هنا اسم الصوره وصيغه الخاصه فيها"/>
    </meta>

    جرب كذا

  7. On 27/10/2022 at 19:39, jamalgoving said:

    السلام عليكم عندي ذا الكود ما اعرف ليش ميشتغل وقت اشغل اللعبة وهو مفعل تتطلع النافذة فورا شو اعمل حتى كود الازرار تحت مش بيشتغل احتاج مساعدة

    GUIEditor = {
        button = {}
    }
    addEventHandler("onClientResourceStart", resourceRoot,
        function()
    
            GUIEditor.button[1] = guiCreateButton(0.24, 0.23, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[1], "default-bold-small")
            guiSetProperty(GUIEditor.button[1], "NormalTextColour", "F5FF97EE")
    
            GUIEditor.button[2] = guiCreateButton(0.24, 0.30, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[2], "default-bold-small")
            guiSetProperty(GUIEditor.button[2], "NormalTextColour", "F5FF97EE")
    
    
            GUIEditor.button[3] = guiCreateButton(0.24, 0.36, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[3], "default-bold-small")
            guiSetProperty(GUIEditor.button[3], "NormalTextColour", "F5FF97EE")
    
    
            GUIEditor.button[4] = guiCreateButton(0.24, 0.30, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[4], "default-bold-small")
            guiSetProperty(GUIEditor.button[4], "NormalTextColour", "F5FF97EE")
    
    
            GUIEditor.button[5] = guiCreateButton(0.24, 0.50, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[5], "default-bold-small")
            guiSetProperty(GUIEditor.button[5], "NormalTextColour", "F5FF97EE")
    
    
            GUIEditor.button[6] = guiCreateButton(0.24, 0.57, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[6], "default-bold-small")
            guiSetProperty(GUIEditor.button[6], "NormalTextColour", "F5FF97EE")
    
    
            GUIEditor.button[7] = guiCreateButton(0.24, 0.43, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[7], "default-bold-small")
            guiSetProperty(GUIEditor.button[7], "NormalTextColour", "F5FF97EE")
    
    
            GUIEditor.button[8] = guiCreateButton(0.24, 0.64, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[8], "default-bold-small")
            guiSetProperty(GUIEditor.button[8], "NormalTextColour", "F5FF97EE")    
        end
    )
    
    local screenW, screenH = guiGetScreenSize()
    
    addEventHandler("onClientRender", root,
        function()
    
            dxDrawLine(318 - 1, 113 - 1, 318 - 1, 619, tocolor(173, 0, 146, 202), 1, false)
            dxDrawLine(1012, 113 - 1, 318 - 1, 113 - 1, tocolor(173, 0, 146, 202), 1, false)
            dxDrawLine(318 - 1, 619, 1012, 619, tocolor(173, 0, 146, 202), 1, false)
            dxDrawLine(1012, 619, 1012, 113 - 1, tocolor(173, 0, 146, 202), 1, false)
            dxDrawRectangle(318, 113, 694, 506, tocolor(1, 0, 1, 202), false)
            dxDrawRectangle(359, 142, 0, 0, tocolor(255, 255, 255, 255), false)
            dxDrawRectangle(screenW * 0.3492, screenH * 0.1849, screenW * 0.0000, screenH * 0.0221, tocolor(4, 2, 7, 220), true)
            dxDrawText("Goving سيرفر", (screenW * 0.2335) - 1, (screenH * 0.7773) - 1, (screenW * 0.7408) - 1, (screenH * 0.8060) - 1, tocolor(0, 0, 0, 254), 1.80, "default-bold", "center", "center", false, false, false, true, false)
            dxDrawText("Goving سيرفر", (screenW * 0.2335) + 1, (screenH * 0.7773) - 1, (screenW * 0.7408) + 1, (screenH * 0.8060) - 1, tocolor(0, 0, 0, 254), 1.80, "default-bold", "center", "center", false, false, false, true, false)
            dxDrawText("Goving سيرفر", (screenW * 0.2335) - 1, (screenH * 0.7773) + 1, (screenW * 0.7408) - 1, (screenH * 0.8060) + 1, tocolor(0, 0, 0, 254), 1.80, "default-bold", "center", "center", false, false, false, true, false)
            dxDrawText("Goving سيرفر", (screenW * 0.2335) + 1, (screenH * 0.7773) + 1, (screenW * 0.7408) + 1, (screenH * 0.8060) + 1, tocolor(0, 0, 0, 254), 1.80, "default-bold", "center", "center", false, false, false, true, false)
            dxDrawText("Goving سيرفر", screenW * 0.2335, screenH * 0.7773, screenW * 0.7408, screenH * 0.8060, tocolor(151, 255, 185, 245), 1.80, "default-bold", "center", "center", false, false, false, true, false)
            dxDrawText("اللوحة الرئيسية", (screenW * 0.2372) - 1, (screenH * 0.1484) - 1, (screenW * 0.7372) - 1, (screenH * 0.1979) - 1, tocolor(58, 1, 1, 254), 1.70, "default-bold", "center", "center", true, false, true, true, false)
            dxDrawText("اللوحة الرئيسية", (screenW * 0.2372) + 1, (screenH * 0.1484) - 1, (screenW * 0.7372) + 1, (screenH * 0.1979) - 1, tocolor(58, 1, 1, 254), 1.70, "default-bold", "center", "center", true, false, true, true, false)
            dxDrawText("اللوحة الرئيسية", (screenW * 0.2372) - 1, (screenH * 0.1484) + 1, (screenW * 0.7372) - 1, (screenH * 0.1979) + 1, tocolor(58, 1, 1, 254), 1.70, "default-bold", "center", "center", true, false, true, true, false)
            dxDrawText("اللوحة الرئيسية", (screenW * 0.2372) + 1, (screenH * 0.1484) + 1, (screenW * 0.7372) + 1, (screenH * 0.1979) + 1, tocolor(58, 1, 1, 254), 1.70, "default-bold", "center", "center", true, false, true, true, false)
            dxDrawText("اللوحة الرئيسية", screenW * 0.2372, screenH * 0.1484, screenW * 0.7372, screenH * 0.1979, tocolor(217, 67, 254, 254), 1.70, "default-bold", "center", "center", true, false, true, true, false)
        end
    )
    
    addEventHandler ( "onClientGUIClick", root, function (    ) 
        if ( source == m
     ) then -- اسم الزر الي بعد ماتضغطه يطلع لك اللوحه 
        guiSetVisible (  dxDrawRectangle, true ) -- هنا حط اسم اللوحه الي تبيها تطلع بعد ما تضغط الزر 
        --  هنا حط اللوحه والقيم الي فيها مثل الصور والازرار عشان تطلع 
            elseif ( source ==  m
     ) then -- اسم الزر حق اخفاء اللوحه الي طلعتها 
        guiSetVisible (  dxDrawRectangle, false ) -- اخفاء اللوحه 
        showCursor ( false ) -- X 
        end 
    end ) 

    اريد الحل وشكرا

    وعليكم السلام فيك تجرب كذا

    --------
    local screenW, screenH = guiGetScreenSize()
    --------
    bool = false
    --------
    function Panel()
    	if bool == true then
            dxDrawLine(318 - 1, 113 - 1, 318 - 1, 619, tocolor(173, 0, 146, 202), 1, false)
            dxDrawLine(1012, 113 - 1, 318 - 1, 113 - 1, tocolor(173, 0, 146, 202), 1, false)
            dxDrawLine(318 - 1, 619, 1012, 619, tocolor(173, 0, 146, 202), 1, false)
            dxDrawLine(1012, 619, 1012, 113 - 1, tocolor(173, 0, 146, 202), 1, false)
            dxDrawRectangle(318, 113, 694, 506, tocolor(1, 0, 1, 202), false)
            dxDrawRectangle(359, 142, 0, 0, tocolor(255, 255, 255, 255), false)
            dxDrawRectangle(screenW * 0.3492, screenH * 0.1849, screenW * 0.0000, screenH * 0.0221, tocolor(4, 2, 7, 220), true)
            dxDrawText("Goving سيرفر", (screenW * 0.2335) - 1, (screenH * 0.7773) - 1, (screenW * 0.7408) - 1, (screenH * 0.8060) - 1, tocolor(0, 0, 0, 254), 1.80, "default-bold", "center", "center", false, false, false, true, false)
            dxDrawText("Goving سيرفر", (screenW * 0.2335) + 1, (screenH * 0.7773) - 1, (screenW * 0.7408) + 1, (screenH * 0.8060) - 1, tocolor(0, 0, 0, 254), 1.80, "default-bold", "center", "center", false, false, false, true, false)
            dxDrawText("Goving سيرفر", (screenW * 0.2335) - 1, (screenH * 0.7773) + 1, (screenW * 0.7408) - 1, (screenH * 0.8060) + 1, tocolor(0, 0, 0, 254), 1.80, "default-bold", "center", "center", false, false, false, true, false)
            dxDrawText("Goving سيرفر", (screenW * 0.2335) + 1, (screenH * 0.7773) + 1, (screenW * 0.7408) + 1, (screenH * 0.8060) + 1, tocolor(0, 0, 0, 254), 1.80, "default-bold", "center", "center", false, false, false, true, false)
            dxDrawText("Goving سيرفر", screenW * 0.2335, screenH * 0.7773, screenW * 0.7408, screenH * 0.8060, tocolor(151, 255, 185, 245), 1.80, "default-bold", "center", "center", false, false, false, true, false)
            dxDrawText("اللوحة الرئيسية", (screenW * 0.2372) - 1, (screenH * 0.1484) - 1, (screenW * 0.7372) - 1, (screenH * 0.1979) - 1, tocolor(58, 1, 1, 254), 1.70, "default-bold", "center", "center", true, false, true, true, false)
            dxDrawText("اللوحة الرئيسية", (screenW * 0.2372) + 1, (screenH * 0.1484) - 1, (screenW * 0.7372) + 1, (screenH * 0.1979) - 1, tocolor(58, 1, 1, 254), 1.70, "default-bold", "center", "center", true, false, true, true, false)
            dxDrawText("اللوحة الرئيسية", (screenW * 0.2372) - 1, (screenH * 0.1484) + 1, (screenW * 0.7372) - 1, (screenH * 0.1979) + 1, tocolor(58, 1, 1, 254), 1.70, "default-bold", "center", "center", true, false, true, true, false)
            dxDrawText("اللوحة الرئيسية", (screenW * 0.2372) + 1, (screenH * 0.1484) + 1, (screenW * 0.7372) + 1, (screenH * 0.1979) + 1, tocolor(58, 1, 1, 254), 1.70, "default-bold", "center", "center", true, false, true, true, false)
            dxDrawText("اللوحة الرئيسية", screenW * 0.2372, screenH * 0.1484, screenW * 0.7372, screenH * 0.1979, tocolor(217, 67, 254, 254), 1.70, "default-bold", "center", "center", true, false, true, true, false)
        end
    end
    --------
    GUIEditor = {
        button = {}
    }
            GUIEditor.button[1] = guiCreateButton(0.24, 0.23, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[1], "default-bold-small")
            guiSetProperty(GUIEditor.button[1], "NormalTextColour", "F5FF97EE")
            guiSetVisible(GUIEditor.button[1], false)
            GUIEditor.button[2] = guiCreateButton(0.24, 0.30, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[2], "default-bold-small")
            guiSetProperty(GUIEditor.button[2], "NormalTextColour", "F5FF97EE")
            guiSetVisible(GUIEditor.button[2], false)
            GUIEditor.button[3] = guiCreateButton(0.24, 0.36, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[3], "default-bold-small")
            guiSetProperty(GUIEditor.button[3], "NormalTextColour", "F5FF97EE")
            guiSetVisible(GUIEditor.button[3], false)
            GUIEditor.button[4] = guiCreateButton(0.24, 0.30, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[4], "default-bold-small")
            guiSetProperty(GUIEditor.button[4], "NormalTextColour", "F5FF97EE")
            guiSetVisible(GUIEditor.button[7], false)
            GUIEditor.button[4] = guiCreateButton(0.24, 0.50, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[5], "default-bold-small")
            guiSetProperty(GUIEditor.button[5], "NormalTextColour", "F5FF97EE")
            guiSetVisible(GUIEditor.button[5], false)
            GUIEditor.button[6] = guiCreateButton(0.24, 0.57, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[6], "default-bold-small")
            guiSetProperty(GUIEditor.button[6], "NormalTextColour", "F5FF97EE")
            guiSetVisible(GUIEditor.button[6], false)
            GUIEditor.button[7] = guiCreateButton(0.24, 0.43, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[7], "default-bold-small")
            guiSetProperty(GUIEditor.button[7], "NormalTextColour", "F5FF97EE")
            guiSetVisible(GUIEditor.button[7], false)
            GUIEditor.button[8] = guiCreateButton(0.24, 0.64, 0.11, 0.06, "معلومات الشخصية", true)
            guiSetFont(GUIEditor.button[8], "default-bold-small")
            guiSetProperty(GUIEditor.button[8], "NormalTextColour", "F5FF97EE")  
    --------
    function OpenPanel()
      bool = not bool
    	if removeEventHandler("onClientRender", root, Panel) then
    		removeEventHandler("onClientRender", root, Panel)
    		guiSetVisible(GUIEditor.button[1], false)
    		guiSetVisible(GUIEditor.button[2], false)
    		guiSetVisible(GUIEditor.button[3], false)
    		guiSetVisible(GUIEditor.button[4], false)
    		guiSetVisible(GUIEditor.button[5], false)
    		guiSetVisible(GUIEditor.button[6], false)
    		guiSetVisible(GUIEditor.button[7], false)
    		guiSetVisible(GUIEditor.button[8], false)
    		showCursor(false)
    	else
    		addEventHandler("onClientRender", root, Panel)
    		guiSetVisible(GUIEditor.button[1], true)
    		guiSetVisible(GUIEditor.button[2], true)
    		guiSetVisible(GUIEditor.button[3], true)
    		guiSetVisible(GUIEditor.button[4], true)
    		guiSetVisible(GUIEditor.button[5], true)
    		guiSetVisible(GUIEditor.button[6], true)
    		guiSetVisible(GUIEditor.button[7], true)
    		guiSetVisible(GUIEditor.button[8], true)
    		showCursor(true)
    	end
    end
    bindKey("F5", "down", OpenPanel)

     

    و الأزرار فيك تكملها عادي بشكل طبعي تضيفها تحت فتح لوحة وتكمل 

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

     

    • Like 1
  8. 1 hour ago, Firespider said:
    The bottom line would be that if a player goes into the MArker, the given marker disappears, but the Destroyelement does not recognize the playerMarker element
     
     
     
    -- Server Side
    addEventHandler("onPlayerQuit", root,
    	function()
    		if isElement(vehicle[source]) then
    			destroyElement(vehicle[source])
    			vehicle[source] = nil
    	end
    end)
    
    vehicle = {}
    
    addEvent("car", true)
    addEventHandler("car", root,
        function()
            if isElement(vehicle[source]) then destroyElement(vehicle[source]) end
            local x, y, z = getElementPosition(source)
            vehicle[source] = createVehicle(579, 341.7890625, -1373.0964355469, 14.366669654846, 0, 380, 470) --599 is the vehicle's hands. Put any vehicle you want
            warpPedIntoVehicle(source, vehicle[source])
            playerMarker = createMarker(313.41094970703, -1394.2287597656, 13.993467330933, "cylinder", 4, 255, 0, 0, 0)
            addEventHandler("onMarkerHit", playerMarker, handlePlayerMarker)
    end)
    
    function handlePlayerMarker(hitElement)
        local elementType = getElementType(hitElement)
        destroyElement(playerMarker)
    end
    

     

    addEventHandler("onPlayerMarkerHit", getRootElement(),
    	function( mFirstMis, matchingDimension )
    		if (matchingDimension) then
    			destroyElement( mFirstMis )
    			destroyElement( bFirstMis )
    	end
    end)

    try this  
    Replace what you have and try

  9. --Client Side
    local sx,sy = guiGetScreenSize();--1920,1080
    local relx,rely = sx/1920,sy/1080;
    -----------
    IsCardShop = false
    local money = getPlayerMoney(localPlayer)
    local Cardlist = {
    [1] = {411, "Jogosítvány", 1000},
    [2] = {482, "Jogosítvány", 10000},
    };
    color = tocolor(41, 173, 21, 255)
    -----------
    function Panel()
           if IsCardShop == true then 
              dxDrawRectangle(sx*.35, sy*.35, sx*.30, sy*.05, tocolor(0, 0, 0, 200))--Fejléc    
                dxDrawText("Jogosítvány", sx*.50, sy*.035, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat
              dxDrawRectangle(sx*.35, sy*.40, sx*.30, sy*.20, tocolor(30, 40, 50, 250))-- panel 
              dxDrawRectangle(sx*.40, sy*.47, sx*.06, sy*.05, color1 or color)--gomb1
                dxDrawText("Megvétel", sx*.36, sy*.27, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat
                dxDrawText("Legális 1000$", sx*.36, sy*.19, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat
              dxDrawRectangle(sx*0.55, sy*0.47, sx*0.06, sy*0.05, color2 or color)--gomb1
                dxDrawText("Megvétel", sx*.66, sy*.27, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat          
              dxDrawText("Ilegális 10000$", sx*.66, sy*.19, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat
              dxDrawText("Összeged: "..money.."$", sx*.52, sy*.40, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat
    -----------
    function isMouseInPosition ( x, y, width, height )
        if ( not isCursorShowing( ) ) then
            return false
        end
        local sx, sy = guiGetScreenSize ( )
        local cx, cy = getCursorPosition ( )
        local cx, cy = ( cx * sx ), ( cy * sy )
        
        return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) )
    end
    ----------    
    if isMouseInPosition(sx*.40, sy*.47, sx*.06, sy*.05) then
      color1 = tocolor(88, 0, 0, 50)
      else
        color1 = color
    end
    -----------
    if isMouseInPosition(sx*0.55, sy*0.47, sx*0.06, sy*0.05) then
        color2 = tocolor(88, 0, 0, 50)
        else
          color2 = color
    end
    end
    end
    ---------- 
    function OpenWindow()
        IsCardShop = not IsCardShop
        if removeEventHandler("onClientRender", root, Panel) then
        removeEventHandler("onClientRender", root, Panel)
        showCursor(false)
    else
        addEventHandler("onClientRender", root, Panel)
        showCursor(true)
    end
    end
    bindKey("F3", "down", OpenWindow)
    ----------
    addEventHandler("onClientClick", root,
      function(button,state)
        if IsCardShop == true then
          if ( button == "left" and state == "down" ) then
            if isMouseInPosition(sx*0.55, sy*0.47, sx*0.06, sy*0.05) then
            local yourMoney = getPlayerMoney()
            if ( yourMoney >= 10000) then
              takePlayerMoney(10000)
              triggerServerEvent("car", getLocalPlayer())
            else
            outputChatBox("* You Don't Have Enough Money",255,0,0,true)
            --outputChatBox("Menj be a Markerbe a vizsga elkezdéséhez")
          end
        end
      end
    end
    end)
    ----------
    
    local thePed = createPed(579, 336.8766784668, -1358.7130126953, 14.5078125, 280)
    
    addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld)
        if (button == "right") and (state == "up") then
            if isElement(clickedWorld) and clickedWorld == thePed then
                IsCardShop = not IsCardShop
                removeEventHandler("onClientRender", root, Panel)
                if IsCardShop then
                    addEventHandler("onClientRender", root, Panel)
                end
            end
        end
    end)
    
    bindKey("BACKSPACE","down",function() if IsCardShop == true then IsCardShop = false end end)
    --Server Side
    vehicle = {}
    --------
    addEvent("car", true)
    addEventHandler("car", root,
    	function()
    		if isElement(vehicle[source]) then destroyElement(vehicle[source]) end
    		local x, y, z = getElementPosition(source)
    		vehicle[source] = createVehicle(599, x, y, z) --599 is the vehicle's hands. Put any vehicle you want
    		warpPedIntoVehicle(source, vehicle[source])
    end)

    try this

    20 minutes ago, Firespider said:
    It just doesn't detect the playerMarker for some reason
     
     
     

    You what do you want, I do not understand you Do you want a panel to open in Marker

  10. -- Server Side
    addEventHandler("onPlayerQuit", root,
    	function()
    		if isElement(vehicle[source]) then
    			destroyElement(vehicle[source])
    			vehicle[source] = nil
    	end
    end)
    
    vehicle = {}
    
    addEvent("car", true)
    addEventHandler("car", root,
    	function()
    		if isElement(vehicle[source]) then destroyElement(vehicle[source]) end
    		local x, y, z = getElementPosition(source)
    		vehicle[source] = createVehicle(599, x, y, z) --599 is the vehicle's hands. Put any vehicle you want
    		warpPedIntoVehicle(source, vehicle[source])
    end)

    try this

    1 minute ago, Firespider said:
    Can you help me in this?
     
     

    try this

  11. -- Client Side
    local sx,sy = guiGetScreenSize();--1920,1080
    local relx,rely = sx/1920,sy/1080;
    -----------
    IsCardShop = false
    local money = getPlayerMoney(localPlayer)
    local Cardlist = {
    [1] = {411, "Jogosítvány", 1000},
    [2] = {482, "Jogosítvány", 10000},
    };
    color = tocolor(41, 173, 21, 255)
    -----------
    function Panel()
           if IsCardShop == true then 
              dxDrawRectangle(sx*.35, sy*.35, sx*.30, sy*.05, tocolor(0, 0, 0, 200))--Fejléc    
                dxDrawText("Jogosítvány", sx*.50, sy*.035, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat
              dxDrawRectangle(sx*.35, sy*.40, sx*.30, sy*.20, tocolor(30, 40, 50, 250))-- panel 
              dxDrawRectangle(sx*.40, sy*.47, sx*.06, sy*.05, color1 or color)--gomb1
                dxDrawText("Megvétel", sx*.36, sy*.27, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat
                dxDrawText("Legális 1000$", sx*.36, sy*.19, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat
              dxDrawRectangle(sx*0.55, sy*0.47, sx*0.06, sy*0.05, color2 or color)--gomb1
                dxDrawText("Megvétel", sx*.66, sy*.27, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat          
              dxDrawText("Ilegális 10000$", sx*.66, sy*.19, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat
              dxDrawText("Összeged: "..money.."$", sx*.52, sy*.40, sx*.50, sy*.72, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat
    -----------
    function isMouseInPosition ( x, y, width, height )
        if ( not isCursorShowing( ) ) then
            return false
        end
        local sx, sy = guiGetScreenSize ( )
        local cx, cy = getCursorPosition ( )
        local cx, cy = ( cx * sx ), ( cy * sy )
        
        return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) )
    end
    -----------
    if isMouseInPosition(sx*.40, sy*.47, sx*.06, sy*.05) then
      color1 = tocolor(34, 110, 23, 255)
      else
        color1 = color
    end
    -----------
    if isMouseInPosition(sx*0.55, sy*0.47, sx*0.06, sy*0.05) then
        color2 = tocolor(34, 110, 23, 255)
        else
          color2 = color
    end
    end
    end
    -----------
    function OpenWindow()
        IsCardShop = not IsCardShop
        if removeEventHandler("onClientRender", root, Panel) then
        removeEventHandler("onClientRender", root, Panel)
        showCursor(false)
    else
        addEventHandler("onClientRender", root, Panel)
        showCursor(true)
    end
    end
    ----------
    addEventHandler("onClientClick", root,
      function(button,state)
        if IsCardShop then
          if ( button == "left" and state == "down" ) then
            if isMouseInPosition(sx*0.55, sy*0.47, sx*0.06, sy*0.05) then
            	triggerServerEvent("car", getLocalPlayer())
            IsCardShop = false
            outputChatBox("Menj be a Markerbe a vizsga elkezdéséhez")
            end
        end
    end
    end)
    ----------
    local thePed = createPed(579, 336.8766784668, -1358.7130126953, 14.5078125, 280)
    
    addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld)
        if (button == "right") and (state == "up") then
            if isElement(clickedWorld) and clickedWorld == thePed then
                IsCardShop = not IsCardShop
                removeEventHandler("onClientRender", root, Panel)
                if IsCardShop then
                    addEventHandler("onClientRender", root, Panel)
                end
            end
        end
    end)
    
    bindKey("BACKSPACE","down",function() if IsCardShop == true then IsCardShop = false end end)

     

  12. 7 minutes ago, Firespider said:
    How can I make a marker on the client side and create a car on the server side when a player enters it?
     
     
     

    I don't understand what you mean, do you want to make a car?

  13. It must be available to turn on the button or press the divorce

    Take this as a rule in the DX. If this is not available, the button will not work in any case

    function isMouseInPosition ( x, y, width, height )
        if ( not isCursorShowing( ) ) then
            return false
        end
        local sx, sy = guiGetScreenSize ( )
        local cx, cy = getCursorPosition ( )
        local cx, cy = ( cx * sx ), ( cy * sy )
        
        return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) )
    end
    --------------
    addEventHandler("onClientClick", root,
      function(button,state)
        if IsCardShop then
          if ( button == "left" and state == "down" ) then
            if isMouseInPosition(sx*0.55, sy*0.47, sx*0.06, sy*0.05) then
            end
        end
    end
    end)

    It should be like this

    try this

  14. 2 hours ago, Firespider said:
    I wrote this, but something doesn't work with then, it says an error code
     
     
    unknown.png
    addEventHandler("onClientClick", root,
      function(button,state)
        if IsCardShop then
          if ( button == "left" and state == "down" ) then
            if isMouseInPosition(sx*0.55, sy*0.47, sx*0.06, sy*0.05) then
            end
        end
    end
    end)

    try this

    There is something that, if it is not there, may not work

    function isMouseInPosition ( x, y, width, height )
        if ( not isCursorShowing( ) ) then
            return false
        end
        local sx, sy = guiGetScreenSize ( )
        local cx, cy = getCursorPosition ( )
        local cx, cy = ( cx * sx ), ( cy * sy )
        
        return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) )
    end

     

  15. 27 minutes ago, Firespider said:
    I mean that if the player clicks on a ped, the menu opens like in my code, this is possible with this code.
     
     
     

    You mean when I play, he presses the button, a panel appears

  16. 39 minutes ago, Firespider said:
    Is it possible to open it with an NPC in the same way?
     
     
     

    I do not understand what you're saying

×
×
  • Create New...