Jump to content

البحث عن الاعب في الأدمينية


Recommended Posts

function onClientGUIChanged() 
    local name = guiGetText(source) 
    for index, player in pairs(getElementsByType("player")) do 
        if string.find(getPlayerName(player):lower(), name:lower()) then 
                     --CODE 
        end 
    end 
end 
addEventHandler("onClientGUIChanged", guiEdit, onClientGUIChanged) 

Link to comment
  • 2 weeks later...

server:

addEventHandler("onPlayerLogin",root, 
function(_,account) 
setElementData(source,"accountName",getAccountName(account)) 
end) 

client:

function onClientGUIChanged() 
    local name = guiGetText(source) 
    for index, player in pairs">pairs(getElementsByType("player")) do 
        local accountName = getElementData(player,"accountName") or "" 
        if string.find(accountName:lower(), name:lower()) then 
                     --CODE 
        end 
    end 
end 
addEventHandler("onClientGUIChanged", guiEdit, onClientGUIChanged) 

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