Home Blog CS:GO

Onetap V3 Re:Run Documentation: Classes

Path

A path consists of 1-4 strings.

ref = Reference("Misc", "JAVASCRIPT", "Script Items", "Hello World");
ref = Reference(["Misc", "JAVASCRIPT", "Script Items", "Hello World"]);
ref = Reference("Hello World");  // references an element named "Hello World" (can be anywhere)

// WARNING: when using a single string, make sure you dont reuse one of onetap's names
ref = Reference("Enabled"); // references fake-lag's enabled

Angle

An angle has 3 values: pitch, yaw and roll.

angle = new Angle(1, 2, 3)
angle.pitch === 1
angle.yaw === 2
angle.roll === 3

Vector2

A 2 dimensional vector has 2 numbers: x and y.

Vector3

A 3 dimensional vector has 3 numbers: x, y and z.

RGBA

4 numbers, red, green, blue and alpha.

See also: https://en.wikipedia.org/wiki/RGBA_color_model

Reference

Reference.GetValue()

Returns the value of this UI element.

fakelag_enable = Reference("Anti-Aim", "Fake-Lag", "Enabled");
fakelag_limit = Reference("Anti-Aim", "Fake-Lag", "Limit");
function getFakelag() {
    if(!fakelag_enable.GetValue())
        return 0;  // fakelag disabled
    return fakelag_limit.GetValue();
}

Reference.GetString(): string

Returns the string from this textbox.

Reference.GetColor(): RGBA

Returns the selected color from this colorpicker.

Reference.SetValue(value)

Sets the value of this UI element.

fakelag_enable = Reference("Anti-Aim", "Fake-Lag", "Enabled");
function disableFakeLag() {
    fakelag_enable.SetValue(false);
}
function toggleFakeLag() {
    fakelag_enable.SetValue(!fakelag_enable.GetValue())
}

Reference.SetColor(value: RGBA)

Sets the color of this colorpicker.

Reference.SetEnabled(value: boolean)

Enables/disables this checkbox.

Reference.IsHotkeyActive(): boolean

Returns whether this hotkey is active or not.

Reference.ToggleHotkey(): number

Toggles this hotkey.
Returns the new active state. (0 = inactive, 1 = active)

Entity

Entity.IsTeammate(): boolean

Returns if this entity is a teammate.

Entity.IsEnemy(): boolean

Returns if this entity is an enemy.

Entity.IsBot(): boolean

Returns if this entity is a bot.

Entity.IsLocalPlayer(): boolean

Returns if this entity is yourself.

Entity.IsValid(): boolean

Returns if this entity is valid.

Entity.IsAlive(): boolean

Returns if this entity is alive.

Entity.IsDormant(): boolean

Returns if this entity is dormant.

Entity.GetClassID(): number

Returns the class id of this entity.

NOTE: Class ids sometimes change during game updates, and shouldn't be used for identification.
Use Entity.GetClassName instead.

Entity.GetClassName(): string

Returns the class name of this entity.

Entity.GetName(): string

Returns the name of this entity.

Entity.GetWeapon(): Entity

Returns the current held weapon of this entity.

Entity.GetWeapons(): Array[Entity]

Returns all weapons of this entity.

Entity.GetRenderOrigin(): Vector3

Returns the position of this entity.

Entity.GetRenderBox()

Returns the render box of this entity as an array:

[visible: boolean, min_x: number, min_y: number, max_x: number, max_y: number]

Entity.GetProp(table: string, propname: string)

Returns the value of the specified prop.

table will be the entity's classname most of the time (CCSPlayer for players).

Entity.SetProp(table: string, propname: string, value)

Sets the specified prop to the specified value.

table will be the entity's classname most of the time (CCSPlayer for players).

Entity.GetHitboxPositions(bone: Bone): Vector3

Returns the position of the bone.

Entity.GetEyePosition(): Vector3

Returns the position of the "eye" of this entity (the place where bullets come from).

Material

Material.SetKeyValue(key: string, value: string)

Overrides value of the material.

Note: Can only be called during a Material callback.

Material.Refresh()

Overrides value of the material.

Note: Can only be called during a Material callback.

Material.Destroy(): boolean

Destroy this entity and returns if the destruction was successful.