mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Fixed Rank Filter On Player Table
This commit is contained in:
@@ -54,7 +54,8 @@ function add_input.draw_text(frame,name,display)
|
|||||||
for _,text in pairs(inputs.text) do
|
for _,text in pairs(inputs.text) do
|
||||||
if text[1] == name then
|
if text[1] == name then
|
||||||
local display = display or text[2] or text[1]
|
local display = display or text[2] or text[1]
|
||||||
frame.add{name=name, type='textfield', text=display}
|
frame.add{name=name, type='textfield'}
|
||||||
|
frame[name].caption=display
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ player_table_functions.filters = {
|
|||||||
{'online',false,function(player) return player.connected end},
|
{'online',false,function(player) return player.connected end},
|
||||||
{'offline',false,function(player) return not player.connected end},
|
{'offline',false,function(player) return not player.connected end},
|
||||||
{'online_time',true,function(player,input) if input and tonumber(input) and tonumber(input) < tick_to_min(player.online_time) then return true elseif not input or not tonumber(input) then return true end end},
|
{'online_time',true,function(player,input) if input and tonumber(input) and tonumber(input) < tick_to_min(player.online_time) then return true elseif not input or not tonumber(input) then return true end end},
|
||||||
{'rank',true,function(player,input) if input and string_to_rank(input) and get_rank(player).power <= string_to_rank(input).power then return true end end}
|
{'rank',true,function(player,input) if input and string_to_rank(input) and get_rank(player).power <= string_to_rank(input).power then return true elseif not input or not string_to_rank(input) then return true end end}
|
||||||
}
|
}
|
||||||
--set up all the text inputs
|
--set up all the text inputs
|
||||||
for _,filter in pairs(player_table_functions.filters) do
|
for _,filter in pairs(player_table_functions.filters) do
|
||||||
@@ -53,7 +53,7 @@ function player_table_functions.get_filters(frame)
|
|||||||
local filters = {}
|
local filters = {}
|
||||||
for _,filter in pairs(player_table_functions.filters) do
|
for _,filter in pairs(player_table_functions.filters) do
|
||||||
if frame.input_bar[filter[1]] then
|
if frame.input_bar[filter[1]] then
|
||||||
if frame.input_bar[filter[1]].text ~= 'Enter '..filter[1]:gsub('_',' ') or not frame.input_bar[filter[1]].text:find('%S') then
|
if frame.input_bar[filter[1]].text:find('%S') then
|
||||||
table.insert(filters,{filter[1],frame.input_bar[filter[1]].text})
|
table.insert(filters,{filter[1],frame.input_bar[filter[1]].text})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user