212 void Rect(vector rectPos, vector rectSize, vector rectRGB ,
float rectAlpha);
220 void RectOutline(vector rectPos, vector rectSize,
float outlineThickness, vector rectColor,
float rectAlpha);
235 void RoundedBox(vector boxPos, vector boxSize, vector boxColor,
float boxAlpha);
244 void Line(
float lineThickness, vector startPos, vector endPos, vector lineColor,
float lineAlpha);
252 void Pic(vector imagePos,
string imageName, vector imageSize, vector imageColor,
float imageAlpha,
float imageFlags);
262 void SubPic(vector imagePos, vector displaySize,
string imageName, vector sourcePos, vector sourceSize, vector imageColor,
float imageAlpha,
float imageFlags);
311 void TextField(vector vecOrigin, vector vecSize,
string strText,
font_s fnt, alignflags_t iAlignFlags);
320 void TextFieldAtHeight(vector vecOrigin, vector vecSize,
int iTextHeight,
string strText,
font_s fnt, alignflags_t iAlignFlags);
534 void Draw_RGBA(
int atlasPic, vector drawAtPos, vector picColor,
float picAlpha,
bool forceAdditive);
535 void DrawTop_RGBA(
int atlasPic, vector drawAtPos,
float percentageDrawn, vector picColor,
float picAlpha,
bool forceAdditive);
536 void DrawBottom_RGBA(
int atlasPic, vector drawAtPos,
float percentageDrawn, vector picColor,
float picAlpha,
bool forceAdditive);
537 void DrawLeft_RGBA(
int atlasPic, vector drawAtPos,
float percentageDrawn, vector picColor,
float picAlpha,
bool forceAdditive);
538 void DrawRight_RGBA(
int atlasPic, vector drawAtPos,
float percentageDrawn, vector picColor,
float picAlpha,
bool forceAdditive);
541 void DrawTop_RGB(
int atlasPic, vector drawAtPos,
float percentageDrawn, vector picColor,
bool forceAdditive);
570linkToClientProgs(
string funcName)
572 static void empty(
void)
574 print(
"Called unimplemented client-side API call.\n");
578 void *func = externvalue(0, funcName);
581 return ((__variant)func);
590 font.GetHeight = linkToClientProgs(
"Font_GetHeight");
591 font.GetID = linkToClientProgs(
"Font_GetID");
592 font.Load = linkToClientProgs(
"Font_Load");
593 font.RGBtoHex = linkToClientProgs(
"Font_RGBtoHex");
594 font.StringWidth = linkToClientProgs(
"Font_StringWidth");
596 screen.Width = linkToClientProgs(
"CLPF_surface_ScreenWidth");
597 screen.Height = linkToClientProgs(
"CLPF_surface_ScreenHeight");
598 screen.Size = linkToClientProgs(
"CLPF_surface_ScreenSize");
599 screen.Mins = linkToClientProgs(
"CLPF_surface_ScreenMins");
600 screen.HUDMins = linkToClientProgs(
"CLPF_surface_HUDMins");
601 screen.HUDSize = linkToClientProgs(
"CLPF_surface_HUDSize");
603 material.GetSize = linkToClientProgs(
"CLPF_material_GetSize");
604 material.GetWidth = linkToClientProgs(
"CLPF_material_GetWidth");
605 material.GetHeight = linkToClientProgs(
"CLPF_material_GetHeight");
606 material.Cached = linkToClientProgs(
"CLPF_material_Cached");
608 player.GetCameraPosition = linkToClientProgs(
"CLPF_player_GetCameraPosition");
609 player.GetCameraAngles = linkToClientProgs(
"CLPF_player_GetCameraAngles");
610 player.GetHealth = linkToClientProgs(
"CLPF_player_GetHealth");
611 player.GetArmor = linkToClientProgs(
"CLPF_player_GetArmor");
612 player.GetStamina = linkToClientProgs(
"CLPF_player_GetStamina");
613 player.GetTeam = linkToClientProgs(
"CLPF_player_GetTeam");
614 player.HasItem = linkToClientProgs(
"CLPF_player_HasItem");
615 player.IsStanding = linkToClientProgs(
"CLPF_player_IsStanding");
616 player.IsLeaning = linkToClientProgs(
"CLPF_player_IsLeaning");
617 player.IsSprinting = linkToClientProgs(
"CLPF_player_IsSprinting");
618 player.IsCrouched = linkToClientProgs(
"CLPF_player_IsCrouching");
619 player.IsProne = linkToClientProgs(
"CLPF_player_IsProne");
620 player.IsMoving = linkToClientProgs(
"CLPF_player_IsMoving");
621 player.IsFalling = linkToClientProgs(
"CLPF_player_IsFalling");
622 player.GetGameFlags = linkToClientProgs(
"CLPF_player_GetGameFlags");
624 player.GetString = linkToClientProgs(
"CLPF_player_GetString");
625 player.GetInteger = linkToClientProgs(
"CLPF_player_GetInteger");
626 player.GetBool = linkToClientProgs(
"CLPF_player_GetBool");
627 player.GetFloat = linkToClientProgs(
"CLPF_player_GetFloat");
628 player.GetVector = linkToClientProgs(
"CLPF_player_GetVector");
630 weapon.IsValid = linkToClientProgs(
"CLPF_weapon_IsValid");
631 weapon.GetTitle = linkToClientProgs(
"CLPF_weapon_GetTitle");
632 weapon.GetIcon = linkToClientProgs(
"CLPF_weapon_GetIcon");
633 weapon.GetSelectedIcon = linkToClientProgs(
"CLPF_weapon_GetSelectedIcon");
634 weapon.GetSlot = linkToClientProgs(
"CLPF_weapon_GetSlot");
635 weapon.GetSlotPos = linkToClientProgs(
"CLPF_CLPF_weapon_GetSlotPos");
636 weapon.GetAmmo1 = linkToClientProgs(
"CLPF_weapon_GetAmmo1");
637 weapon.GetAmmo2 = linkToClientProgs(
"CLPF_weapon_GetAmmo2");
638 weapon.GetClip = linkToClientProgs(
"CLPF_weapon_GetClip");
639 weapon.GetClipSize = linkToClientProgs(
"CLPF_CLPF_weapon_GetClipSize");
640 weapon.MaxAmmo = linkToClientProgs(
"CLPF_weapon_MaxAmmo");
641 weapon.UsesSecondaryAmmo = linkToClientProgs(
"CLPF_weapon_UsesSecondaryAmmo");
642 weapon.AmmoRequired = linkToClientProgs(
"CLPF_weapon_AmmoRequired");
643 weapon.GetActiveWeapon = linkToClientProgs(
"CLPF_weapon_GetActiveWeapon");
644 weapon.GetFirstWeaponInInventory = linkToClientProgs(
"CLPF_weapon_GetFirstWeaponInInventory");
645 weapon.GetLastWeaponInInventory = linkToClientProgs(
"CLPF_weapon_GetLastWeaponInInventory");
646 weapon.GetNextWeaponRelativeTo = linkToClientProgs(
"CLPF_weapon_GetNextWeaponRelativeTo");
647 weapon.GetPreviousWeaponRelativeTo = linkToClientProgs(
"CLPF_weapon_GetPreviousWeaponRelativeTo");
648 weapon.SelectWeapon = linkToClientProgs(
"CLPF_weapon_SelectWeapon");
650 draw.Rect = linkToClientProgs(
"CLPF_draw_Rect");
651 draw.RectOutline = linkToClientProgs(
"CLPF_draw_RectOutline");
652 draw.RoundedRectOutline = linkToClientProgs(
"CLPF_draw_RoundedRectOutline");
653 draw.RoundedBox = linkToClientProgs(
"CLPF_draw_RoundedBox");
654 draw.Line = linkToClientProgs(
"CLPF_draw_Line");
655 draw.Pic = linkToClientProgs(
"CLPF_draw_Pic");
656 draw.SubPic = linkToClientProgs(
"CLPF_draw_SubPic");
658 draw.TextField = linkToClientProgs(
"Font_DrawField");
659 draw.TextFieldAtHeight = linkToClientProgs(
"Font_DrawFieldAtHeight");
660 draw.RText = linkToClientProgs(
"Font_DrawRText");
661 draw.RText_A = linkToClientProgs(
"Font_DrawRText_A");
662 draw.RText_RGB = linkToClientProgs(
"Font_DrawRText_RGB");
663 draw.RText_RGBA = linkToClientProgs(
"Font_DrawRText_RGBA");
664 draw.Text = linkToClientProgs(
"Font_DrawText");
665 draw.Text_A= linkToClientProgs(
"Font_DrawText_A");
666 draw.Text_RGB= linkToClientProgs(
"Font_DrawText_RGB");
667 draw.Text_RGBA = linkToClientProgs(
"Font_DrawText_RGBA");
668 draw.RadarRect = linkToClientProgs(
"CLPF_draw_RadarRect");
670 spectating.Mode = linkToClientProgs(
"CLPF_spectating_Mode");
671 spectating.LocalizedMode = linkToClientProgs(
"CLPF_spectating_LocalizedMode");
672 spectating.Name = linkToClientProgs(
"CLPF_spectating_Name");
673 spectating.Team = linkToClientProgs(
"CLPF_spectating_Team");
675 atlasPic.Load = linkToClientProgs(
"CLPF_atlasPic_Load");
676 atlasPic.Draw = linkToClientProgs(
"CLPF_atlasPic_Draw");
677 atlasPic.Draw_A = linkToClientProgs(
"CLPF_atlasPic_Draw_A");
678 atlasPic.Draw_RGB = linkToClientProgs(
"CLPF_atlasPic_Draw_RGB");
679 atlasPic.Draw_RGBA = linkToClientProgs(
"CLPF_atlasPic_Draw_RGBA");
680 atlasPic.DrawTop_RGBA = linkToClientProgs(
"CLPF_atlasPic_DrawTop_RGBA");
681 atlasPic.DrawBottom_RGBA = linkToClientProgs(
"CLPF_atlasPic_DrawBottom_RGBA");
682 atlasPic.DrawLeft_RGBA = linkToClientProgs(
"CLPF_atlasPic_DrawLeft_RGBA");
683 atlasPic.DrawRight_RGBA = linkToClientProgs(
"CLPF_atlasPic_DrawRight_RGBA");
685 atlasPic.DrawTop_RGB = linkToClientProgs(
"CLPF_atlasPic_DrawTop_RGB");
686 atlasPic.DrawBottom_RGB = linkToClientProgs(
"CLPF_atlasPic_DrawBottom_RGB");
687 atlasPic.DrawLeft_RGB = linkToClientProgs(
"CLPF_atlasPic_DrawLeft_RGB");
688 atlasPic.DrawRight_RGB = linkToClientProgs(
"CLPF_atlasPic_DrawRight_RGB");
690 atlasPic.DrawCrosshair = linkToClientProgs(
"CLPF_atlasPic_DrawCrosshair");
691 atlasPic.GetWidth = linkToClientProgs(
"CLPF_atlasPic_GetWidth");
692 atlasPic.GetHeight = linkToClientProgs(
"CLPF_atlasPic_GetHeight");
693 atlasPic.GetSize = linkToClientProgs(
"CLPF_atlasPic_GetSize");
var surfaceAPI_t screen
Access surfaceAPI_t functions using this variable.
Definition api_func.h:201
var spectatingAPI_t spectating
Access spectatingAPI_t functions using this variable.
Definition api_func.h:526
var fontAPI_t font
Access fontAPI_t functions using this variable.
Definition api_func.h:188
var materialAPI_t material
Access atlasPicAPI_t functions using this variable.
Definition api_func.h:562
var weaponAPI_t weapon
Access weaponAPI_t functions using this variable.
Definition api_func.h:515
var drawAPI_t draw
Access drawAPI_t functions using this variable.
Definition api_func.h:325
var atlasPicAPI_t atlasPic
Access atlasPicAPI_t functions using this variable.
Definition api_func.h:552
var playerAPI_t player
Access playerAPI_t functions using this variable.
Definition api_func.h:421
atlasPic library
Definition api_func.h:530
void DrawLeft_RGBA(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, float picAlpha, bool forceAdditive)
void DrawTop_RGBA(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, float picAlpha, bool forceAdditive)
void Draw_RGB(int atlasPic, vector drawAtPos, vector picColor, bool forceAdditive)
void DrawRight_RGB(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, bool forceAdditive)
void DrawLeft_RGB(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, bool forceAdditive)
float GetWidth(int atlasPic)
void Draw_RGBA(int atlasPic, vector drawAtPos, vector picColor, float picAlpha, bool forceAdditive)
int Load(string atlasPicName)
float GetHeight(int atlasPic)
void DrawBottom_RGBA(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, float picAlpha, bool forceAdditive)
void Draw_A(int atlasPic, vector drawAtPos, float picAlpha, bool forceAdditive)
void DrawTop_RGB(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, bool forceAdditive)
void DrawRight_RGBA(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, float picAlpha, bool forceAdditive)
void Draw(int atlasPic, vector drawAtPos, bool forceAdditive)
void DrawCrosshair(int atlasPic)
vector GetSize(int atlasPic)
void DrawBottom_RGB(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, bool forceAdditive)
Draw library.
Definition api_func.h:205
void RText_RGB(vector vecOrigin, string strText, vector col, font_s fnt)
Right-aligned variant of Text_RGB().
void Text(vector vecOrigin, string strText, font_s fnt)
Draw text on the screen at the desired position with a desired font.
void Line(float lineThickness, vector startPos, vector endPos, vector lineColor, float lineAlpha)
Displays a line with a specified thickness and color.
void TextFieldAtHeight(vector vecOrigin, vector vecSize, int iTextHeight, string strText, font_s fnt, alignflags_t iAlignFlags)
Draws a textfield with line wrapping at a custom text height.
void Text_RGBA(vector vecOrigin, string strText, vector col, float a, font_s fnt)
Draw tinted and alpha blended text on the screen at the desired position with a desired font.
void TextField(vector vecOrigin, vector vecSize, string strText, font_s fnt, alignflags_t iAlignFlags)
Draws a textfield with line wrapping.
void Text_RGB(vector vecOrigin, string strText, vector col, font_s fnt)
Draw tinted text on the screen at the desired position with a desired font.
void RoundedRectOutline(vector rectPos, vector rectSize, vector rectColor, float rectAlpha)
Displays a colored, rounded rectangle outline at the specified position with a specified size.
void RadarRect(vector vecOrigin, vector vecSize)
Draws an opaque, rectangular radar that is centered around the current player, or the player that is ...
void Rect(vector rectPos, vector rectSize, vector rectRGB, float rectAlpha)
Displays a solid colored rectangle at the specified position with a specified size.
void SubPic(vector imagePos, vector displaySize, string imageName, vector sourcePos, vector sourceSize, vector imageColor, float imageAlpha, float imageFlags)
Draws part of an image from either the virtual file-system, or the materials.
void RText_RGBA(vector vecOrigin, string strText, vector col, float a, font_s fnt)
Right-aligned variant of Text_RGBA().
void RoundedBox(vector boxPos, vector boxSize, vector boxColor, float boxAlpha)
Displays a colored rounded box at the specified position with a specified size.
void Pic(vector imagePos, string imageName, vector imageSize, vector imageColor, float imageAlpha, float imageFlags)
Draws an image from either the virtual file-system, or the materials.
void RText_A(vector vecOrigin, string strText, float a, font_s fnt)
Right-aligned variant of Text_A().
void RectOutline(vector rectPos, vector rectSize, float outlineThickness, vector rectColor, float rectAlpha)
Displays a colored rectangle outline at the specified position with a specified size.
void RText(vector vecOrigin, string strText, font_s fnt)
Right-aligned variant of Text().
void Text_A(vector vecOrigin, string strText, float a, font_s fnt)
Draw alpha-blended text on the screen at the desired position with a desired font.
Font library.
Definition api_func.h:142
float GetID(font_s fnt)
Get the internal font id.
string RGBtoHex(vector normalizedColor)
Converts a normalized RGB color vector to a hex color string.
void Load(string fontDef, font_s &fntNew)
Load a desired .font definition into memory.
int GetHeight(font_s fnt)
Returns the height of a specified font in pixels.
float StringWidth(string inputText, bool hasColor, font_s fnt)
Returns the width of a series of characters in pixels.
Representation of a font.
Definition api_func.h:39
int iFlags
Rendering flags that the font posesses.
Definition api_func.h:45
int iScaleX
Suggested maximum width of a character in the font.
Definition api_func.h:41
int iScaleY
Maximum height of a chracter in the font.
Definition api_func.h:42
vector vecColor
Suggested default color of the font.
Definition api_func.h:43
float flAlpha
Suggested default alpha of the font.
Definition api_func.h:44
int iID
Internal ID, will be passed to 'drawfont' before rendering text.
Definition api_func.h:40
string hexColor
Definition api_func.h:46
material library
Definition api_func.h:556
float GetWidth(string materialName)
float GetHeight(string materialName)
vector GetSize(string materialName)
Player library.
Definition api_func.h:329
float GetFloat(string userKey)
Returns the floating-point value of a current/active player's info-key.
int GetTeam(void)
Get the current player's team ID.
bool GetBool(string userKey)
Returns the boolean value of a current/active player's info-key.
float GetHealth(void)
Get the current player's health value.
float GetArmor(void)
Get the current player's armor value.
bool IsLeaning(void)
Check if the current player is leaning in any direction.
bool IsProne(void)
Check if the current player is actively prone/laying flat on the ground.
bool IsCrouched(void)
Check if the current player is actively crouched/ducked.
vector GetCameraAngles(void)
Get the current 3D viewport's camera angle.
bool IsMoving(void)
Check if the current player is actively moving.
bool HasItem(string itemClassName)
Check if the current player has a particular item.
int GetInteger(string userKey)
Returns the integer value of a current/active player's info-key.
bool IsStanding(void)
Check if the current player is standing upright.
float GetStamina(void)
Get the current player's stamina value.
vector GetVector(string userKey)
Returns the vector value of a current/active player's info-key.
float GetGameFlags(void)
Returns the game flags of the player entity.
string GetString(string userKey)
Returns the string value of the current/active player's info-key.
bool IsFalling(void)
Check if the current player is not on ground.
bool IsSprinting(void)
Check if the current player is actively sprinting.
vector GetCameraPosition(void)
Get the current 3D viewport's camera position.
Spectating library.
Definition api_func.h:520
ncSpectatorMode_t Mode(void)
string LocalizedMode(void)
Surface library.
Definition api_func.h:193
vector HUDSize(void)
Returns the size of the HUD.
float Height(void)
The height of the surface or display.
float Width(void)
The width of the surface or display.
vector HUDMins(void)
Returns the top-left starting position of the HUD on the surface.
vector Size(void)
The size of the surface or display.
vector Mins(void)
Returns the top-left starting position of the surface.
Weapon library.
Definition api_func.h:425
bool UsesSecondaryAmmo(entity weaponRef=__NULL__)
Returns if the current/active weapon item in the player's inventory makes use of a secondary ammo typ...
entity GetNextWeaponRelativeTo(entity)
Returns the weapon that comes after (in the player's inventory) the input weapon.
string GetTitle(entity weaponRef=__NULL__)
Returns the title of the weapon specified.
entity GetActiveWeapon(void)
Returns the current/active weapon item in the player's inventory.
entity GetLastWeaponInInventory(void)
Returns the last weapon item in the player's inventory.
int GetSlotPos(entity weaponRef=__NULL__)
Returns if the slot position of the weapon specified.
int GetAmmo1(entity weaponRef=__NULL__)
Returns if the current/active weapons present reserve ammo.
string GetIcon(entity weaponRef=__NULL__)
Returns the inventory icons of the weapon specified.
bool AmmoRequired(entity weaponRef=__NULL__)
Returns if the current/active weapon item in the player's inventory requires ammo.
entity GetPreviousWeaponRelativeTo(entity playerWeapon)
Returns the weapon that comes before (in the player's inventory) the input weapon.
int GetClipSize(entity weaponRef=__NULL__)
Returns if the current/active weapons maximum clip/magazine size.
int MaxAmmo(entity weaponRef=__NULL__)
Returns if the maximum reserve ammo.
entity GetFirstWeaponInInventory(void)
Returns the first weapon item in the player's inventory.
int GetClip(entity weaponRef=__NULL__)
Returns if the current/active weapons present clip/magazine size.
string GetSelectedIcon(entity weaponRef=__NULL__)
Returns the selected variant inventory icons of the weapon specified.
bool IsValid(entity weaponRef=__NULL__)
Returns whether this entity reference to a weapon is still valid.
int GetAmmo2(entity weaponRef=__NULL__)
Returns if the current/active weapons present reserve ammo, but for the second ammo type.
void SelectWeapon(entity)
Attempts to make the player switch to the specified weapon reference.
int GetSlot(entity weaponRef=__NULL__)
Returns the slot number of the weapon specified.