Jump to content

مربع البحث


mody134

Recommended Posts

  1. addEventHandler("onClientGUIChanged", root, 
    function () 
    if ( source == search ) then 
    if ( guiGetText ( source ) == "" ) then 
    guiGridListClear(grdPlayers) 
    for i,v in ipairs(getElementsByType("player")) do 
    local row = guiGridListAddRow(grdPlayers) 
    guiGridListSetItemText(grdPlayers,row,1,getPlayerName(v):gsub("#%x%x%x%x%x%x", ""),false,false) 
    end
    else 
    guiGridListClear(grdPlayers) 
    for i,v in ipairs(getElementsByType("player")) do 
    if string.find(getPlayerName(v),guiGetText(search)) then 
    local row = guiGridListAddRow(grdPlayers) 
    guiGridListSetItemText(grdPlayers,row,1,getPlayerName(v):gsub("#%x%x%x%x%x%x", ""),false,false) 
    end 
    end 
    end 
    end 
    end 
    )
    search = guiCreateEdit(62, 341, 216, 34, "", false, GUIEditor.window[1])

    وش الخطا بالكود ؟

Link to comment
15 minutes ago, mody134 said:
  1. 
    addEventHandler("onClientGUIChanged", root, 
    function () 
    if ( source == search ) then 
    if ( guiGetText ( source ) == "" ) then 
    guiGridListClear(grdPlayers) 
    for i,v in ipairs(getElementsByType("player")) do 
    local row = guiGridListAddRow(grdPlayers) 
    guiGridListSetItemText(grdPlayers,row,1,getPlayerName(v):gsub("#%x%x%x%x%x%x", ""),false,false) 
    end
    else 
    guiGridListClear(grdPlayers) 
    for i,v in ipairs(getElementsByType("player")) do 
    if string.find(getPlayerName(v),guiGetText(search)) then 
    local row = guiGridListAddRow(grdPlayers) 
    guiGridListSetItemText(grdPlayers,row,1,getPlayerName(v):gsub("#%x%x%x%x%x%x", ""),false,false) 
    end 
    end 
    end 
    end 
    end 
    )
    
    
    search = guiCreateEdit(62, 341, 216, 34, "", false, GUIEditor.window[1])
    

    وش الخطا بالكود ؟

جرب

 

addEventHandler("onClientGUIChanged", root, 
function () 
if ( source == search ) then 
if ( guiGetText ( source ) == "search" ) then 
guiGridListClear(grdPlayers) 
for i,v in ipairs(getElementsByType("player")) do 
local row = guiGridListAddRow(grdPlayers) 
guiGridListSetItemText(grdPlayers,row,1,getPlayerName(v):gsub("#%x%x%x%x%x%x", ""),false,false) 
end
else 
guiGridListClear(grdPlayers) 
for i,v in ipairs(getElementsByType("player")) do 
if string.find(getPlayerName(v),guiGetText(search)) then 
local row = guiGridListAddRow(grdPlayers) 
guiGridListSetItemText(grdPlayers,row,1,getPlayerName(v):gsub("#%x%x%x%x%x%x", ""),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...