Garry's Mod Wiki

killicon.AddTexCoord

  killicon.AddTexCoord( string class, string texture, table color, number x, number y, number w, number h )

Description

Creates new kill icon using a sub-rectangle of a texture.

Arguments

1 string class
Weapon or entity class this killicon is for.
2 string texture
Path to the texture.
3 table color
Color of the kill icon.
4 number x
The start position (X axis) of the rectangle on the given texture. This is in texture coordinates.
5 number y
The start position (Y axis) of the rectangle on the given texture. This is in texture coordinates.
6 number w
The width of the rectangle on the given texture. This is in texture coordinates.
7 number h
The height of the rectangle on the given texture. This is in texture coordinates.

Example

Creates a kill icon using TF2 kill icons image.

killicon.AddTexCoord( "heavy_punch", "hud/dneg_images", color_white, 193, 449, 60, 30 )