mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 19:45:22 +09:00
Added Camera to player info
This commit is contained in:
@@ -8,7 +8,7 @@ Discord: https://discord.gg/r6dC2uK
|
||||
]]
|
||||
--Please Only Edit Below This Line-----------------------------------------------------------
|
||||
|
||||
function get_player_info(player,frame)
|
||||
function get_player_info(player,frame,add_cam)
|
||||
local player = Game.get_player(player)
|
||||
if not player then return {} end
|
||||
local _player = {}
|
||||
@@ -24,7 +24,7 @@ function get_player_info(player,frame)
|
||||
if frame then
|
||||
local frame = frame.add{type='frame',direction='vertical',style='image_frame'}
|
||||
frame.style.width = 200
|
||||
frame.style.height = 150
|
||||
frame.style.height = 275
|
||||
frame.add{type='label',caption={'player-info.name',_player.index,_player.name},style='caption_label'}
|
||||
local _online = {'player-info.no'}; if _player.online then _online = {'player-info.yes'} end
|
||||
frame.add{type='label',caption={'player-info.online',_online,tick_to_display_format(_player.online_time)}}
|
||||
@@ -32,6 +32,9 @@ function get_player_info(player,frame)
|
||||
frame.add{type='label',caption={'player-info.admin',_admin}}
|
||||
frame.add{type='label',caption={'player-info.group',_player.group}}
|
||||
frame.add{type='label',caption={'player-info.rank',_player.rank}}
|
||||
if add_cam then
|
||||
Gui.cam_link{entity=player.character,frame=frame,width=200,height=75,zoom=0.5}
|
||||
end
|
||||
end
|
||||
return _player
|
||||
end
|
||||
@@ -39,7 +39,7 @@ local player_drop_down = Gui.inputs.add_drop_down('player-drop-down-rank-change'
|
||||
local player_info_flow = element.parent.parent.info_flow
|
||||
player_info_flow.clear()
|
||||
if selected == 'Select Player' then return
|
||||
else get_player_info(selected,player_info_flow) end
|
||||
else get_player_info(selected,player_info_flow,true) end
|
||||
local rank = Ranking.get_rank(player)
|
||||
local _rank = Ranking.get_rank(selected)
|
||||
if rank.power >= _rank.power then element.parent.warning.caption = {'rank-changer.warning'}
|
||||
|
||||
Reference in New Issue
Block a user