cwCombinePlayerCard panelclient
Panel defined in plugin/derma/cl_pda.lua
Part of Combine Civil Authority
Summary
Methods
Adds an action button to the player card; it appears on the next
Rebuild.Init()client
Creates the player card's civil record list and fires
AddCombinePDAButons to collect its buttons.PaintOver(width, height)client
Draws the player's name, faction, residence, points, loyalist tier and citizen status.
Rebuild()client
Lays out the card for its player: civil record, model and the buttons the viewer may use.
SetPlayer(player)client
Sets the player the card shows and rebuilds it.
Methods
PANEL:AddButton(id, name, bIsCombine, callback)
client gamemodes/cwhl2rp/plugins/cca/plugin/derma/cl_pda.lua:274Adds an action button to the player card; it appears on the next Rebuild.
pda:AddButton('jail', '#PDA_Jail', true, function(card, button)
cable.send('Application::PDA::Controller::Jail', card.player)
end)
Parameters
- id String Unique ID of the button
- name String Button text or language key
- bIsCombine Boolean Whether only Combine players see the button
- callback Function Called with the card panel and the button when clicked
Creates the player card's civil record list and fires AddCombinePDAButons to collect its buttons.
Draws the player's name, faction, residence, points, loyalist tier and citizen status.
Combine players show an insufficient permissions message instead of their details.
Parameters
- width
- height
Lays out the card for its player: civil record, model and the buttons the viewer may use.
The model and buttons of the previous layout are removed first. Buttons are hidden for Combine targets, and Combine-only buttons for non-Combine viewers.
Sets the player the card shows and rebuilds it.
Parameters
- player Player The player, or a name to look up with
_player.Find; invalid values are ignored