The 'flux_player' player class, which Flux assigns to every player. It derives from the 'player_default' class of Garry's Mod and passes the callbacks of the player class on to Flux hooks: setting up the data tables runs PlayerSetupDataTables, and the loadout runs PostPlayerLoadout with the default loadout of the class, the fists. It also picks the hands model that matches the model of the player.

Summary

Methods

Determines which hands model to use for the player's current model.
Loadout()shared
Runs the 'PostPlayerLoadout' hook with the default loadout of the player class.
Draws the hands of the local player after the view model has been drawn.
Sets up the 'Initialized' data table variable of the player and runs the 'PlayerSetupDataTables' hook.

Methods

flux_player:GetHandsModel()

shared packages/flow/lib/classes/sh_player.lua:39

Determines which hands model to use for the player's current model.

Returns

  • Map hands info with the model, skin and body keys

flux_player:Loadout()

shared packages/flow/lib/classes/sh_player.lua:73

Runs the 'PostPlayerLoadout' hook with the default loadout of the player class.

flux_player:PostDrawViewModel(_viewmodel, weapon)

shared packages/flow/lib/classes/sh_player.lua:62

Draws the hands of the local player after the view model has been drawn.

Parameters

  • _viewmodel Entity
  • weapon Weapon

flux_player:SetupDataTables()

shared packages/flow/lib/classes/sh_player.lua:23

Sets up the 'Initialized' data table variable of the player and runs the 'PlayerSetupDataTables' hook.

Defined in