Garry's Mod Wiki

PLAYER

A list of hooks available in player classes.

These hooks are used in player_manager thus can't be hooked

Parameters

Player [Player]

The player for which a hook is called.

Events

PLAYER:ClassChanged()
Called when the player's class was changed from this class.
PLAYER:Death()
Called when the player dies
boolean PLAYER:FinishMove( CMoveData mv )
Called from GM:FinishMove. This hook will not work if the current gamemode overrides GM:FinishMove and does not call this hook.This hook is run after the drive.FinishMove has been called.
table PLAYER:GetHandsModel()
Called on player spawn to determine which hand model to use
PLAYER:Init()
Called when the class object is created
PLAYER:Loadout()
Called on spawn to give the player their default loadout
boolean PLAYER:Move( CMoveData mv )
Called from GM:Move. This hook will not work if the current gamemode overrides GM:Move and does not call this hook.This hook is run after the drive.Move has been called.
PLAYER:PostDrawViewModel( Entity viewmodel, Entity weapon )
Called after the viewmodel has been drawn
PLAYER:PreDrawViewModel( Entity viewmodel, Entity weapon )
Called before the viewmodel is drawn
PLAYER:SetModel()
Called when we need to set player model from the class. This will only be called if you have not overridden GM:PlayerSetModel or call this function from it or anywhere else using player_manager.RunClass
PLAYER:SetupDataTables()
Setup the network table accessors.
PLAYER:Spawn()
Called when the player spawns
boolean PLAYER:StartMove( CMoveData mv, CUserCmd cmd )
Called from GM:CreateMove. This hook will not work if the current gamemode overrides GM:SetupMove and does not call this hook.This hook is run after the drive.StartMove has been called.
PLAYER:ViewModelChanged( Entity viewmodel, string old, string new )
Called when the player changes their weapon to another one causing their viewmodel model to change

Page Links


Special Pages


Wikis

?

Render Time: 68ms

DB GetPage 41
Generate Html 4
SaveChanges (1) 9
Render Body 0
Render Sidebar 11