Jump to content

طلب كود


Mohamed

Recommended Posts

يعني يصير كدا

GUIEditor.button[60] = guiCreateButton(565,80,130,40,"Refresh",false,GUIEditor.window[1]) 
        setElementData( GUIEditor.button[60], 'aButton',GUIEditor.button[60] ) 
        addEventHandler( 'onClientGUIClick',GUIEditor.button[60], aRefreshList, false ) 
  
function aRefreshList( ) 
    guiSetEnabled( getElementData( GUIEditor.button[60], 'aButton' ) , false ) 
    guiGridListClear( GUIEditor.gridlist[1] ) 
    setTimer( guiSetEnabled, 4000, 1, getElementData( GUIEditor.button[60], 'aButton'), true ) 
end 
  

Link to comment

:مثآل بسيط

Taple = { 
    { "# ZA7F = ;", "Files/1.png"}, 
    { "KING-_-HOHO", "Files/2.png"}, 
} 
  
function RefreshList( ) 
  guiGridListClear( GridList ) 
   for _,v in ipairs ( Taple ) do 
     local row = guiGridListAddRow ( GridList ) 
     guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) 
     guiGridListSetItemData ( GridList, row, 1, v[2] ) 
   end 
end 
  
addEventHandler("onClientGUIClick", root, 
function () 
    if source == Butt then 
        setTimer ( RefreshList, 4000, 1) 
    end 
end 
) 

Link to comment
:مثآل بسيط
Taple = { 
    { "# ZA7F = ;", "Files/1.png"}, 
    { "KING-_-HOHO", "Files/2.png"}, 
} 
  
function RefreshList( ) 
  guiGridListClear( GridList ) 
   for _,v in ipairs ( Taple ) do 
     local row = guiGridListAddRow ( GridList ) 
     guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) 
     guiGridListSetItemData ( GridList, row, 1, v[2] ) 
   end 
end 
  
addEventHandler("onClientGUIClick", root, 
function () 
    if source == Butt then 
        setTimer ( RefreshList, 4000, 1) 
    end 
end 
) 

@KING-_-HOHO عندك غلط

كودكـ يصير كذا ...

Taple = { 
    { "# ZA7F = ;", "Files/1.png"}, 
    { "KING-_-HOHO", "Files/2.png"}, 
} 
  
function RefreshList (    ) -- وظيفه التحديث 
    guiGridListClear( GridList ) 
        for _,v in ipairs ( Taple ) do -- نسوي لوب للقيم الي في الجدول يعني نجلب القيم الي في الجدول 
            local row = guiGridListAddRow ( GridList ) 
                guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) 
        guiGridListSetItemData ( GridList, row, 1, v[2] ) 
    end -- اند الفنكشن 
end -- اند الدو 
  
addEventHandler( "onClientguiClick", root, function (    ) -- وظيفه بدون اسم + حدث عند الضغط  
    if ( source == Button ) then -- تحقق من الزر + نحدد السورس 
            if ( isTimer ( Timer ) ) then return end 
        Timer = setTimer ( function (    ) end, RefreshList, 4000, 1 ) -- هنا الوقت انا مخليه بين كل ضغطه وضغطه اربع ثواني 
    end -- اند الفنكشن 
end  -- اند الاف 

@# ZA7F = ; مثل ماقال

تستخدم

setTimer 
isTimer 

==[ كان عندي غلط شوفوه اخر تعليق لي صلحته ]==

وسلام : )

Edited by Guest
Link to comment

انا ابي اسوي رفراش لهذ

  
addEvent("addserial",true) 
addEventHandler("addserial",root, 
function(serial,name,reason,i) 
guiGridListAddRow(aGridlist) 
guiGridListSetItemText(aGridlist, i, 1, name, false, false) 
guiGridListSetItemText(aGridlist, i, 2, serial, false, false) 
guiGridListSetItemText(aGridlist, i, 3, reason, false, false) 
end) 
  

Link to comment
  
--client-- 
addEvent("addserial",true) 
addEventHandler("addserial",root, 
function(serial,name,reason,i) 
guiGridListAddRow(aGridlist) 
guiGridListSetItemText(aGridlist, i, 1, name, false, false) 
guiGridListSetItemText(aGridlist, i, 2, serial, false, false) 
guiGridListSetItemText(aGridlist, i, 3, reason, false, false) 
end) 
  

  
--Server--- 
addEvent("getall",true) 
addEventHandler("getall",root,function() 
for i,v in ipairs ( getSerials() ) do 
triggerClientEvent(source,"addserial",source,v.serial,v.name,v.reason,i) 
end 
end) 
  

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