client.GetLocalPlayer():EntityThe local player entity.
Client state, view angles, convars, chat, world-to-screen.
client.GetLocalPlayer():EntityThe local player entity.
client.GetScreenSize():number, numberScreen width and height.
client.IsInGame():booleanTrue when a game is running.
client.IsConnected():booleanTrue when connected to a server.
client.GetMaxClients():numberMaximum number of players the server supports.
client.GetViewAngles():Vector3Current view angles.
client.SetViewAngles(angles:Vector3)Set the view angles.
client.WorldToScreen(origin:Vector3, viewSetup?:table):number, numberProject world position to screen (x, y), nil when off-screen.
client.IsKeyDown(key:number):booleanTrue while the Windows VK key is held (VK code, not a Source KEY_* button code).
client.GetConVar(name:string):number|stringConVar value as a number or string, nil if not found.
client.SetConVar(name:string, value:number|string|boolean)Set a ConVar from a number, string or boolean.
client.Localize(key:string):stringLocalized string for a key, nil if none.
client.GetLocalPlayerIndex():numberIndex of the local player entity.
client.Command(cmd:string, unrestrict:boolean)Execute a console command, optionally unrestricted.
client.ChatSay(msg:string)Send a chat message.
client.ChatTeamSay(msg:string)Send a team-only chat message.
client.ChatPrintf(msg:string):booleanSend a chat message with color codes, always true.
client.GetPlayerNameByIndex(index:number):stringPlayer name by index, empty if invalid.
client.GetPlayerNameByUserID(userID:number):stringPlayer name by user ID, empty if invalid.
client.GetPlayerInfo(index:number):tablePlayer info table with Name, UserID, SteamID, IsBot, IsHLTV.
client.GetPlayerView():ViewSetupThe local player's view setup, synthesized from eye state and screen size.
client.GetViewSetup():ViewSetupA view setup synthesized from eye position, angles, and screen size.
client.IsFreeTrialAccount():booleanTrue when the local player has a free-trial account.
client.HasCompetitiveAccess():booleanTrue when the current match is in competitive mode.
client.IsInCoachesList():booleanTrue when the local player is in the coaches list.
clientstate.ForceFullUpdate()Force a full server update.
clientstate.GetClientSignonState():numberCurrent client signon state.
clientstate.GetDeltaTick():numberCurrent delta tick count.
clientstate.GetLastOutgoingCommand():numberNumber of the last outgoing command.
clientstate.GetChokedCommands():numberNumber of choked commands.
clientstate.GetLastCommandAck():numberNumber of the last acknowledged command.
clientstate.GetNetChannel():NetChannelThe active net channel, nil if none.
Your health, class and view angles, drawn in the corner every frame.
callbacks.Register("Draw", function()
local me = client.GetLocalPlayer()
if not me:IsValid() then return end
local ang = client.GetViewAngles()
draw.Color(255, 255, 255, 255)
draw.Text(10, 10, string.format("HP %d/%d %s", me:GetHealth(), me:GetMaxHealth(), me:GetClass()))
draw.Text(10, 26, string.format("Pitch %.1f Yaw %.1f", ang.x, ang.y))
end)