Jump to content

استفسار


Mr.king

Recommended Posts

Posted

شباب انا ابي تعدلو الكود ذا

الملخص الكود ذا نافذة ابيها تقتح لقروب معين

outputChatBox("#F44434لفتح اللوحة اضغط  F2", 255, 100, 0, true) 
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(135,127,542,374,"؟",false) 
GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) 
GUIEditor_Tab[3] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) 
GUIEditor_Tab[5] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) 
---------------------------------------- 
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "POLICE" ) ) then 
bindKey( "F2", "down", 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 
  

Posted

Server-only function

triggerServerEvent 
triggerClientEvent 

انت كيف قصدك؟؟

الفنكشن حق اللي يتاكد من القروب سيرفر بس ؟ ( = !!

Posted

طيب كذا صح ؟؟

client-side

outputChatBox("#F44434لفتح اللوحة اضغط  F2", 255, 100, 0, true) 
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(135,127,542,374,"؟",false) 
GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) 
GUIEditor_Tab[3] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) 
GUIEditor_Tab[5] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) 
function open() 
    triggerServerEvent("wnad",localPlayer) 
end 
bindKey( "F2", "down",open) 
addEvent("wnd",true) 
addEventHandler("wnd",root, 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 
  

server-side

addEvent("wnad",true) 
addEventHandler("wnad",root, 
    function () 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Police")) then 
            triggerClientEvent(source,"wnd",source) 
        end 
    end 
) 
  

اتمنى المساعدة

Posted
طيب كذا صح ؟؟

client-side

outputChatBox("#F44434لفتح اللوحة اضغط  F2", 255, 100, 0, true) 
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(135,127,542,374,"؟",false) 
GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) 
GUIEditor_Tab[3] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) 
GUIEditor_Tab[5] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) 
function open() 
    triggerServerEvent("wnad",localPlayer) 
end 
bindKey( "F2", "down",open) 
addEvent("wnd",true) 
addEventHandler("wnd",root, 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 
  

server-side

addEvent("wnad",true) 
addEventHandler("wnad",root, 
    function () 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Police")) then 
            triggerClientEvent(source,"wnd",source) 
        end 
    end 
) 
  

اتمنى المساعدة

ما اشتغل ؟

Posted (edited)
شباب انا ابي تعدلو الكود ذا

الملخص الكود ذا نافذة ابيها تقتح لقروب معين

outputChatBox("#F44434لفتح اللوحة اضغط  F2", 255, 100, 0, true) 
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(135,127,542,374,"؟",false) 
GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) 
GUIEditor_Tab[3] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) 
GUIEditor_Tab[5] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) 
---------------------------------------- 
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "POLICE" ) ) then 
bindKey( "F2", "down", 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 
  

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

كلنت

  
[lua]outputChatBox("#F44434لفتح اللوحة اضغط  F2", 255, 100, 0, true) 
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(135,127,542,374,"؟",false) 
GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) 
GUIEditor_Tab[3] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) 
GUIEditor_Tab[5] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) 
  
bindKey( "F2", "down", 
    function ( ) 
   if isPlayerGroupName("POLICE") then 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) 
  end 
    end 
) 
  
  
function isPlayerGroupName(grp) 
    triggerServerEvent ( "onServerIsRG", getLocalPlayer(),getLocalPlayer(), grp)  
    if getElementData(getLocalPlayer(),"IsRG") == tostring(grp) then 
    return true 
    end 
    return false 
end 
  
  
  
  

سيرفر

  
function OSF (pla, grp ) 
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( tostring(grp) ) ) then 
setElementData(pla,"IsRG",tostring(grp)) 
     else 
setElementData(pla,"IsRG","noG") 
end 
end 
addEvent( "onServerIsRG", true ) 
addEventHandler( "onServerIsRG", getRootElement(), OSF ) 
  
Edited by Guest
Posted
شباب انا ابي تعدلو الكود ذا

الملخص الكود ذا نافذة ابيها تقتح لقروب معين

outputChatBox("#F44434لفتح اللوحة اضغط  F2", 255, 100, 0, true) 
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(135,127,542,374,"؟",false) 
GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) 
GUIEditor_Tab[3] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) 
GUIEditor_Tab[5] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) 
---------------------------------------- 
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "POLICE" ) ) then 
bindKey( "F2", "down", 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 
  

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

كلنت

  
  
  
[lua]outputChatBox("#F44434لفتح اللوحة اضغط  F2", 255, 100, 0, true) 
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Window[1] = guiCreateWindow(135,127,542,374,"؟",false) 
GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) 
GUIEditor_Tab[3] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) 
GUIEditor_Tab[5] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) 
  
bindKey( "F2", "down", 
    function ( ) 
   if isPlayerGroupName("POLICE") then 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) 
  end 
    end 
) 
  
  
function isPlayerGroupName(grp) 
    if grp == true or grp ==  false then 
    return grp 
    else 
 triggerServerEvent ( "onServer", getLocalPlayer(),getLocalPlayer(), grp)  
  end 
end 
addEvent( "onClient", true ) 
addEventHandler( "onClient", getRootElement(), isPlayerGroupName ) 

سيرفر

function OSF (pla, grp ) 
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( tostring(grp) ) ) then 
triggerClientEvent ( pla, "onClient", getRootElement(), true) 
     else 
triggerClientEvent ( pla, "onClient", getRootElement(), false) 
end 
end 
addEvent( "onServer", true ) 
addEventHandler( "onServer", getRootElement(), OSF ) 

لما اشغل المود تنفتح النافذة وانا مني في القروب حق الشرطة ليش اظن كودك فيه خطأ انت جربه

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

Posted
-- Client Side 
outputChatBox("#F44434لفتح اللوحة اضغط  F2", 255, 100, 0, true) 
  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(135,127,542,374,"؟",false) 
GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) 
GUIEditor_Tab[3] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) 
GUIEditor_Tab[5] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) 
  
addEvent ( "wnd", true ) 
addEventHandler ( "wnd", root, 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 

-- Server Side 
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "player" ) ) do 
            bindKey ( v, "F2", "down", givePermissions ) 
        end 
    end 
) 
  
addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        bindKey ( source, "F2", "down", givePermissions ) 
    end 
) 
  
function givePermissions ( ) 
    local playerAccount = getAccountName ( getPlayerAccount ( source ) ) 
    if playerAccount and not isGuestAccount ( playerAccount ) then 
        if isObjectInACLGroup ( "user." .. playerAccount , aclGetGroup ("Police") ) then 
            triggerClientEvent ( source, "wnd", source ) 
        end  
    end 
end 

Posted
-- Client Side 
outputChatBox("#F44434لفتح اللوحة اضغط  F2", 255, 100, 0, true) 
  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(135,127,542,374,"؟",false) 
GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) 
GUIEditor_Tab[3] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) 
GUIEditor_Tab[5] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) 
  
addEvent ( "wnd", true ) 
addEventHandler ( "wnd", root, 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 

-- Server Side 
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "player" ) ) do 
            bindKey ( v, "F2", "down", givePermissions ) 
        end 
    end 
) 
  
addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        bindKey ( source, "F2", "down", givePermissions ) 
    end 
) 
  
function givePermissions ( ) 
    local playerAccount = getAccountName ( getPlayerAccount ( source ) ) 
    if playerAccount and not isGuestAccount ( playerAccount ) then 
        if isObjectInACLGroup ( "user." .. playerAccount , aclGetGroup ("Police") ) then 
            triggerClientEvent ( source, "wnd", source ) 
        end  
    end 
end 

-- Server Side 
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "player" ) ) do 
            bindKey ( v, "F2", "down", givePermissions ) 
        end 
    end 
) 
  
addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        bindKey ( source, "F2", "down", givePermissions ) 
    end 
) 
  
function givePermissions ( source ) 
    local playerAccount = getAccountName ( getPlayerAccount ( source ) ) 
    if playerAccount and not isGuestAccount ( playerAccount ) then 
        if isObjectInACLGroup ( "user." .. playerAccount , aclGetGroup ("Police") ) then 
            triggerClientEvent ( source, "wnd", source ) 
        end  
    end 
end 

Posted

يجيني كلام في اف8 ان المود مو شغال

\server.lua:16: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil]

Posted
-- Client Side 
outputChatBox("#F44434لفتح اللوحة اضغط  F2", 255, 100, 0, true) 
  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(135,127,542,374,"؟",false) 
GUIEditor_TabPanel[3] = guiCreateTabPanel(9,24,524,341,false,GUIEditor_Window[1]) 
GUIEditor_Tab[3] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
GUIEditor_TabPanel[4] = guiCreateTabPanel(135,151,5,5,false,GUIEditor_Tab[3]) 
GUIEditor_Tab[5] = guiCreateTab("؟",GUIEditor_TabPanel[3]) 
closeButton = guiCreateButton(480,5,36,23,"~[x]~",false,GUIEditor_Tab[3]) 
  
addEvent ( "wnd", true ) 
addEventHandler ( "wnd", root, 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 

-- Server Side 
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "player" ) ) do 
            bindKey ( v, "F2", "down", givePermissions ) 
        end 
    end 
) 
  
addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        bindKey ( source, "F2", "down", givePermissions ) 
    end 
) 
  
function givePermissions ( ) 
    local playerAccount = getAccountName ( getPlayerAccount ( source ) ) 
    if playerAccount and not isGuestAccount ( playerAccount ) then 
        if isObjectInACLGroup ( "user." .. playerAccount , aclGetGroup ("Police") ) then 
            triggerClientEvent ( source, "wnd", source ) 
        end  
    end 
end 

-- Server Side 
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "player" ) ) do 
            bindKey ( v, "F2", "down", givePermissions ) 
        end 
    end 
) 
  
addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        bindKey ( source, "F2", "down", givePermissions ) 
    end 
) 
  
function givePermissions ( source ) 
    local playerAccount = getAccountName ( getPlayerAccount ( source ) ) 
    if playerAccount and not isGuestAccount ( playerAccount ) then 
        if isObjectInACLGroup ( "user." .. playerAccount , aclGetGroup ("Police") ) then 
            triggerClientEvent ( source, "wnd", source ) 
        end  
    end 
end 

مشكووووووووووووووور تابل كودك مزبوط 100% الله يعطيك العافية

Posted

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

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

  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(114,90,558,418,"؟",false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(12,27,537,382,false,GUIEditor_Window[1]) 
GUIEditor_Tab[1] = guiCreateTab("؟",GUIEditor_TabPanel[1]) 
GUIEditor_Button[1] = guiCreateButton(15,74,86,44,"الزر1",false,GUIEditor_Tab[1]) 
GUIEditor_Button[2] = guiCreateButton(15,134,86,44,"الزر2",false,GUIEditor_Tab[1]) 
GUIEditor_Image[1] = guiCreateStaticImage(122,14,401,324,"images/1.png",false,GUIEditor_Tab[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(122,14,401,324,"images/2.png",false,GUIEditor_Tab[1]) 
GUIEditor_Tab[2] = guiCreateTab("؟",GUIEditor_TabPanel[1]) 
GUIEditor_Label[1] = guiCreateLabel(204,111,315,130,"؟ ",false,GUIEditor_Tab[2]) 
GUIEditor_Label[2] = guiCreateLabel(198,182,237,42,"؟",false,GUIEditor_Tab[2]) 
closeButton = guiCreateButton(27,297,40,29,"~[x]~",false,GUIEditor_Tab[1]) 
closeButton2 = guiCreateButton(27,297,40,29,"~[x]~",false,GUIEditor_Tab[2]) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetVisible(GUIEditor_Image[1],false) 
guiSetVisible(GUIEditor_Image[2],false) 
-------------------------------------------- 
for i,lal in ipairs(GUIEditor_Label) do 
    guiSetFont(lal,"default-bold-small") 
    guiLabelSetColor(lal,255,255,0) 
------------------------------------------ 
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == closeButton then 
            guiSetVisible( GUIEditor_Window[1], false ) 
            showCursor( false ) 
            guiSetInputEnabled( false ) 
        elseif source == closeButton2 then 
            guiSetVisible( GUIEditor_Window[1], false ) 
            showCursor( false ) 
            guiSetInputEnabled( false ) 
        elseif source == GUIEditor_Button[1] then 
            guiSetVisible( GUIEditor_Image[1], true ) 
            guiSetVisible( GUIEditor_Image[2], false ) 
        elseif source == GUIEditor_Button[2] then 
            guiSetVisible( GUIEditor_Image[1], false ) 
            guiSetVisible( GUIEditor_Image[2], true ) 
        end 
    end 
) 
--------------------------------------- 
addEvent ( "wnd", true ) 
addEventHandler ( "wnd", root, 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 
  
  
  
  
  
  

Posted (edited)
تابل شكرا على الكود الشغال بس انا ضفت كود عشان لو ضغط زر تظهر الصورة الاولى واذا ضغط الزر الثاني تختفي الاولى وتظهر الثانية واذا ضغت من جديد الزر الاول تختفي الصورة الثانية وتظهر الاولى يعني كل زر خاص بصورة

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

  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(114,90,558,418,"؟",false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(12,27,537,382,false,GUIEditor_Window[1]) 
GUIEditor_Tab[1] = guiCreateTab("؟",GUIEditor_TabPanel[1]) 
GUIEditor_Button[1] = guiCreateButton(15,74,86,44,"الزر1",false,GUIEditor_Tab[1]) 
GUIEditor_Button[2] = guiCreateButton(15,134,86,44,"الزر2",false,GUIEditor_Tab[1]) 
GUIEditor_Image[1] = guiCreateStaticImage(122,14,401,324,"images/1.png",false,GUIEditor_Tab[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(122,14,401,324,"images/2.png",false,GUIEditor_Tab[1]) 
GUIEditor_Tab[2] = guiCreateTab("؟",GUIEditor_TabPanel[1]) 
GUIEditor_Label[1] = guiCreateLabel(204,111,315,130,"؟ ",false,GUIEditor_Tab[2]) 
GUIEditor_Label[2] = guiCreateLabel(198,182,237,42,"؟",false,GUIEditor_Tab[2]) 
closeButton = guiCreateButton(27,297,40,29,"~[x]~",false,GUIEditor_Tab[1]) 
closeButton2 = guiCreateButton(27,297,40,29,"~[x]~",false,GUIEditor_Tab[2]) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetVisible(GUIEditor_Image[1],false) 
guiSetVisible(GUIEditor_Image[2],false) 
  
  
-------------------------------------------- 
for i,lal in ipairs(GUIEditor_Label) do 
    guiSetFont(lal,"default-bold-small") 
    guiLabelSetColor(lal,255,255,0) 
------------------------------------------ 
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == closeButton then 
            guiSetVisible( GUIEditor_Window[1], false ) 
            showCursor( false ) 
            guiSetInputEnabled( false ) 
        elseif source == closeButton2 then 
            guiSetVisible( GUIEditor_Window[1], false ) 
            showCursor( false ) 
            guiSetInputEnabled( false ) 
        elseif source == GUIEditor_Button[1] then 
            guiSetVisible( GUIEditor_Image[1], true ) 
            guiSetVisible( GUIEditor_Image[2], false ) 
        elseif source == GUIEditor_Button[2] then 
            guiSetVisible( GUIEditor_Image[1], false ) 
            guiSetVisible( GUIEditor_Image[2], true ) 
        end 
    end 
) 
--------------------------------------- 
addEvent ( "wnd", true ) 
addEventHandler ( "wnd", root, 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 
  
  
  
  
  
  

  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(114,90,558,418,"؟",false) 
guiSetVisible(GUIEditor_Window[1],false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(12,27,537,382,false,GUIEditor_Window[1]) 
GUIEditor_Tab[1] = guiCreateTab("؟",GUIEditor_TabPanel[1]) 
GUIEditor_Button[1] = guiCreateButton(15,74,86,44,"الزر1",false,GUIEditor_Tab[1]) 
GUIEditor_Button[2] = guiCreateButton(15,134,86,44,"الزر2",false,GUIEditor_Tab[1]) 
GUIEditor_Image[1] = guiCreateStaticImage(122,14,401,324,"images/1.png",false,GUIEditor_Tab[1]) 
 guiSetVisible( GUIEditor_Image[1], false ) 
GUIEditor_Image[2] = guiCreateStaticImage(122,14,401,324,"images/2.png",false,GUIEditor_Tab[1]) 
guiSetVisible( GUIEditor_Image[2], false ) 
GUIEditor_Tab[2] = guiCreateTab("؟",GUIEditor_TabPanel[1]) 
GUIEditor_Label[1] = guiCreateLabel(204,111,315,130,"؟ ",false,GUIEditor_Tab[2]) 
GUIEditor_Label[2] = guiCreateLabel(198,182,237,42,"؟",false,GUIEditor_Tab[2]) 
closeButton = guiCreateButton(27,297,40,29,"~[x]~",false,GUIEditor_Tab[1]) 
closeButton2 = guiCreateButton(27,297,40,29,"~[x]~",false,GUIEditor_Tab[2]) 
  
-------------------------------------------- 
for i,lal in ipairs(GUIEditor_Label) do 
    guiSetFont(lal,"default-bold-small") 
    guiLabelSetColor(lal,255,255,0) 
end 
------------------------------------------ 
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == closeButton then 
            guiSetVisible( GUIEditor_Window[1], false ) 
            showCursor( false ) 
            guiSetInputEnabled( false ) 
        elseif source == closeButton2 then 
            guiSetVisible( GUIEditor_Window[1], false ) 
            showCursor( false ) 
            guiSetInputEnabled( false ) 
        elseif source == GUIEditor_Button[1] then 
            guiSetVisible( GUIEditor_Image[1], true ) 
            guiSetVisible( GUIEditor_Image[2], false ) 
        elseif source == GUIEditor_Button[2] then 
            guiSetVisible( GUIEditor_Image[1], false ) 
            guiSetVisible( GUIEditor_Image[2], true ) 
        end 
    end 
) 
--------------------------------------- 
addEvent ( "wnd", true ) 
addEventHandler ( "wnd", root, 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 

Edited by Guest
Posted
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(114,90,558,418,"؟",false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(12,27,537,382,false,GUIEditor_Window[1]) 
GUIEditor_Tab[1] = guiCreateTab("؟",GUIEditor_TabPanel[1]) 
GUIEditor_Button[1] = guiCreateButton(15,74,86,44,"الزر1",false,GUIEditor_Tab[1]) 
GUIEditor_Button[2] = guiCreateButton(15,134,86,44,"الزر2",false,GUIEditor_Tab[1]) 
GUIEditor_Image[1] = guiCreateStaticImage(122,14,401,324,"images/1.png",false,GUIEditor_Tab[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(122,14,401,324,"images/2.png",false,GUIEditor_Tab[1]) 
GUIEditor_Tab[2] = guiCreateTab("؟",GUIEditor_TabPanel[1]) 
GUIEditor_Label[1] = guiCreateLabel(204,111,315,130,"؟ ",false,GUIEditor_Tab[2]) 
GUIEditor_Label[2] = guiCreateLabel(198,182,237,42,"؟",false,GUIEditor_Tab[2]) 
closeButton = guiCreateButton(27,297,40,29,"~[x]~",false,GUIEditor_Tab[1]) 
closeButton2 = guiCreateButton(27,297,40,29,"~[x]~",false,GUIEditor_Tab[2]) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetVisible(GUIEditor_Image[1],false) 
guiSetVisible(GUIEditor_Image[2],false) 
-------------------------------------------- 
for i,lal in ipairs(GUIEditor_Label) do 
    guiSetFont(lal,"default-bold-small") 
    guiLabelSetColor(lal,255,255,0) 
------------------------------------------ 
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == closeButton then 
            guiSetVisible( GUIEditor_Window[1], false ) 
            showCursor( false ) 
            guiSetInputEnabled( false ) 
        elseif source == closeButton2 then 
            guiSetVisible( GUIEditor_Window[1], false ) 
            showCursor( false ) 
            guiSetInputEnabled( false ) 
        elseif source == GUIEditor_Button[1] then 
            guiSetVisible( GUIEditor_Image[1], true ) 
        elseif source == GUIEditor_Button[2] then 
            guiSetVisible( GUIEditor_Image[1], false ) 
            guiSetVisible( GUIEditor_Image[2], true ) 
        end 
    end) 
--------------------------------------- 
addEvent ( "wnd", true ) 
addEventHandler ( "wnd", root, 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end) 
end 

Posted

أنت تبي تكحلها عميتها

حطيت الأند بالأخير

:mrgreen: الحين صار الأفنت يتكرر على عدد الليبلات في الكود

Posted

  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(114,90,558,418,"؟",false) 
guiSetVisible(GUIEditor_Window[1],false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(12,27,537,382,false,GUIEditor_Window[1]) 
GUIEditor_Tab[1] = guiCreateTab("؟",GUIEditor_TabPanel[1]) 
GUIEditor_Button[1] = guiCreateButton(15,74,86,44,"الزر1",false,GUIEditor_Tab[1]) 
GUIEditor_Button[2] = guiCreateButton(15,134,86,44,"الزر2",false,GUIEditor_Tab[1]) 
GUIEditor_Image[1] = guiCreateStaticImage(122,14,401,324,"images/1.png",false,GUIEditor_Tab[1]) 
 guiSetVisible( GUIEditor_Image[1], false ) 
GUIEditor_Image[2] = guiCreateStaticImage(122,14,401,324,"images/2.png",false,GUIEditor_Tab[1]) 
guiSetVisible( GUIEditor_Image[2], false ) 
GUIEditor_Tab[2] = guiCreateTab("؟",GUIEditor_TabPanel[1]) 
GUIEditor_Label[1] = guiCreateLabel(204,111,315,130,"؟ ",false,GUIEditor_Tab[2]) 
GUIEditor_Label[2] = guiCreateLabel(198,182,237,42,"؟",false,GUIEditor_Tab[2]) 
closeButton = guiCreateButton(27,297,40,29,"~[x]~",false,GUIEditor_Tab[1]) 
closeButton2 = guiCreateButton(27,297,40,29,"~[x]~",false,GUIEditor_Tab[2]) 
  
-------------------------------------------- 
for i,lal in ipairs(GUIEditor_Label) do 
    guiSetFont(lal,"default-bold-small") 
    guiLabelSetColor(lal,255,255,0) 
end 
------------------------------------------ 
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == closeButton then 
            guiSetVisible( GUIEditor_Window[1], false ) 
            showCursor( false ) 
            guiSetInputEnabled( false ) 
        elseif source == closeButton2 then 
            guiSetVisible( GUIEditor_Window[1], false ) 
            showCursor( false ) 
            guiSetInputEnabled( false ) 
        elseif source == GUIEditor_Button[1] then 
            guiSetVisible( GUIEditor_Image[1], true ) 
            guiSetVisible( GUIEditor_Image[2], false ) 
        elseif source == GUIEditor_Button[2] then 
            guiSetVisible( GUIEditor_Image[1], false ) 
            guiSetVisible( GUIEditor_Image[2], true ) 
        end 
    end 
) 
--------------------------------------- 
addEvent ( "wnd", true ) 
addEventHandler ( "wnd", root, 
    function ( ) 
        guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) 
    end 
) 
Posted

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

شكرا والله يعطيكم العافية

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