function evolve:FindPlayer( name, def, nonum, noimmunity )
local matches = {}
if ( !name or #name == 0 ) then
matches[1] = def
else
if ( type( name ) != "table" ) then name = { name } end
local name2 = table.Copy( name )
if ( nonum ) then
if ( #name2 > 1 and tonumber( name2[ #name2 ] ) ) then table.remove( name2, #name2 ) end
end
for _, ply in ipairs( player.GetAll() ) do
for _, pm in ipairs( name2 ) do
if ( evolve:IsNameMatch( ply, pm ) and !table.HasValue( matches, ply ) and ( noimmunity or !def or def:EV_BetterThanOrEqual( ply ) ) ) then table.insert( matches, ply ) end
end
end
end
return matches
end
function evolve:CreatePlayerList( tbl, notall )
local lst = ""
local lword = "and"
if ( notall ) then lword = "or" end
if ( #tbl == 1 ) then
lst = tbl[1]:Nick()
elseif ( #tbl == #player.GetAll() ) then
lst = "everyone"
else
for i = 1, #tbl do
if ( i == #tbl ) then lst = lst .. " " .. lword .. " " .. tbl[i]:Nick() elseif ( i == 1 ) then lst = tbl[i]:Nick() else lst = lst .. ", " .. tbl[i]:Nick() end
if ( ply:EV_HasPrivilege( "Rank modification" ) ) then
if ( #args == 6 and tonumber( args[2] ) and evolve.ranks[ args[1] ] and ( args[3] == "guest" or args[3] == "admin" or args[3] == "superadmin" ) and tonumber( args[4] ) and tonumber( args[5] ) and tonumber( args[6] ) ) then