Jump to content

Search Player Tnx Talal


Recommended Posts

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

اخباركم شباب ؟؟

عسساكم بخير ..

اليوم محتاج كود الـ Search

بحث عن الاعب في الـ Grid List

شباب لاحد يجي ويعطيني الايفنت وهيك طلبتكم ابيه جاهز :)

عشان اتعلم اسوي مثله وهيك ..

اطيب تحيةة ..

ابو شنب ..

Edited by Guest
Link to comment
في حآل قام عضو بـ طلب كود ..

لآ يسمح لأي عضو بـ طرح الوظائف جاهزة إلا بعد محاولة صاحب الطلب أو عجزه عن صناعة الوظيفة

'onClientGUIChanged' 
guiGridListClear 
for -- loop سوي 
getElementsByType 
getPlayerName 
string.find 
guiGridListAddRow 
guiGridListSetItemText 

Link to comment

يسسلمو ع المرور اللي قدرت اسويه ..

  
function Search () 
    if ( source == GUIEditor.edit[5] ) then 
        guiGridListClear ( GUIEditor.gridlist[2] ) 
        local text = guiGetText ( source ) 
        if ( text == "" ) then 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
                guiGridListSetItemPlayerName ( GUIEditor.gridlist[2], guiGridListAddRow ( GUIEditor.gridlist[2] ), 1, getPlayerName ( player ), false, false ) 
            end 
        else 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
                if ( string.find ( string.upper ( getPlayerName ( player ) ), string.upper ( text ), 1, true ) ) then 
                    guiGridListSetItemPlayerName ( GUIEditor.gridlist[2], guiGridListAddRow ( GUIEditor.gridlist[2] ), 1, getPlayerName ( player ), false, false ) 
                end 
            end 
        end 
    end 
end 
  
Link to comment

^الحين هو معطيك الوظآئف وما سويتها كلها ؟

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

وعنآد حاط قانون , انت حاول ,

+ الادمنيه موجوده رح شوفها

Link to comment
يسسلمو ع المرور اللي قدرت اسويه ..

  
function Search () 
    if ( source == GUIEditor.edit[5] ) then 
        guiGridListClear ( GUIEditor.gridlist[2] ) 
        local text = guiGetText ( source ) 
        if ( text == "" ) then 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
                guiGridListSetItemPlayerName ( GUIEditor.gridlist[2], guiGridListAddRow ( GUIEditor.gridlist[2] ), 1, getPlayerName ( player ), false, false ) 
            end 
        else 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
                if ( string.find ( string.upper ( getPlayerName ( player ) ), string.upper ( text ), 1, true ) ) then 
                    guiGridListSetItemPlayerName ( GUIEditor.gridlist[2], guiGridListAddRow ( GUIEditor.gridlist[2] ), 1, getPlayerName ( player ), false, false ) 
                end 
            end 
        end 
    end 
end 
  

قلت لي لك؟

Link to comment
وشو ما فهمت لك بريستيج .. ^_^

اظن الكود حقي فيه خرابات ممكن تصلحها ؟

او تسوي كود ثاني

الكود منتوف من الادمنية وفية فنكشن ناقص :

guiGridListSetItemPlayerName

دورة وحطة ^ وبيشتغل

Link to comment
  
function Search () 
    if ( source == GUIEditor.edit[5] ) then 
        guiGridListClear ( GUIEditor.gridlist[2] ) 
         local row = guiGridListAddRow ( GUIEditor.gridlist[2] ) 
         local column = guiGridListAddColumn(GUIEditor.gridlist[2],"Players List ...", 1) 
        local text = guiGetText ( source ) 
        if ( text == "" ) then 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
            guiGridListSetItemText ( GUIEditor.gridlist[2], row, column, getPlayerName ( player ), false, false ) 
                guiGridListSetItemPlayerName ( GUIEditor.gridlist[2], guiGridListAddRow ( GUIEditor.gridlist[2] ), 1, getPlayerName ( player ), false, false ) 
            end 
        else 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
                if ( string.find ( string.upper ( getPlayerName ( player ) ), string.upper ( text ), 1, true ) ) then 
                guiGridListSetItemText ( GUIEditor.gridlist[2], row, column, getPlayerName ( player ), false, false ) 
                    guiGridListSetItemPlayerName ( GUIEditor.gridlist[2], guiGridListAddRow ( GUIEditor.gridlist[2] ), 1, getPlayerName ( player ), false, false ) 
                end 
            end 
        end 
    end 
end 
  

هيك مضبوط ؟؟

Link to comment
  
function Search () 
    if ( source == GUIEditor.edit[5] ) then 
        guiGridListClear ( GUIEditor.gridlist[2] ) 
         local row = guiGridListAddRow ( GUIEditor.gridlist[2] ) 
         local column = guiGridListAddColumn(GUIEditor.gridlist[2],"Players List ...", 1) 
        local text = guiGetText ( source ) 
        if ( text == "" ) then 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
            guiGridListSetItemText ( GUIEditor.gridlist[2], row, column, getPlayerName ( player ), false, false ) 
                guiGridListSetItemPlayerName ( GUIEditor.gridlist[2], guiGridListAddRow ( GUIEditor.gridlist[2] ), 1, getPlayerName ( player ), false, false ) 
            end 
        else 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
                if ( string.find ( string.upper ( getPlayerName ( player ) ), string.upper ( text ), 1, true ) ) then 
                guiGridListSetItemText ( GUIEditor.gridlist[2], row, column, getPlayerName ( player ), false, false ) 
                    guiGridListSetItemPlayerName ( GUIEditor.gridlist[2], guiGridListAddRow ( GUIEditor.gridlist[2] ), 1, getPlayerName ( player ), false, false ) 
                end 
            end 
        end 
    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...