Skip to content
 
 

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nixware - Counter Strike: Global Offensive

API For Lua Scripts (LuaJIT Supported)

mdl.ReplacePath

ui.Checkbox

ui.SliderInt

ui.SliderFloat

ui.KeyBind

ui.Combo

ui.GetBool

ui.GetInt

ui.GetFloat

ui.GetString

ui.SetBool

ui.SetInt

ui.SetFloat

ui.SetString

surface.GetCursorPos

surface.SetupFont

surface.DrawFilledRect

surface.DrawFilledRectFade

surface.DrawOutlinedRect

surface.DrawSetColor

surface.GetTextSize

surface.DrawLine

surface.DrawOutlinedCircle

surface.DrawSetTextFont

surface.DrawSetTextColor

surface.DrawSetTextPos

surface.DrawPrintText

engine.GetLevelNameShort

engine.GetPlayerIndexByUserID

engine.GetLocalPlayer

engine.GetScreenSize

engine.GetViewAngles

engine.SetViewAngles

engine.IsConnected

engine.IsInGame

engine.ExecuteClientCmd

clientstate.ForceFullUpdate

clientstate.chokedcommands

globalvars.realtime

globalvars.framecount

globalvars.absoluteframetime

globalvars.absoluteframestarttimestddev

globalvars.curtime

globalvars.frametime

globalvars.maxClients

globalvars.tickcount

globalvars.interval_per_tick

globalvars.interpolation_amount

client.IsValveDS

client.IsKeyPressed

client.IsVisible

client.GetTimeStamp

client.GetSystemTime

client.GetFOV

client.GetLatency

client.GetUsername

client.GetConvar

client.GetNetvar

client.GetSendPacket

client.SetSendPacket

client.SetClantag

client.SetName

client.RegisterCallback

client.Notification

client.AddToRadioList

client.RandomInt

client.RandomFloat

client.LoadScript

client.UnloadScript

client.LoadConfig

client.WorldToScreen

client.CalcAngle

client.FindIDAPattern

client.FindCodePattern

entitylist.GetPlayerByIndex

entitylist.GetWeaponByIndex

entitylist.GetEntityByIndex

entitylist.GetHighestEntityIndex

entitylist.GetLocalPlayer

entitylist.GetPlayers

entitylist.GetEntitiesByClass

entitylist.GetEntitiesByClassID

netchannel.SetTimeout

netchannel.RequestFile

Player class

Player:IsValidPtr()
Player:IsPlayer()
Player:IsDormant()
Player:IsFlashed()
Player:IsLocalPlayer()
Player:IsTeammate()
Player:IsScoped()
Player:GetIndex()
Player:GetHealth()
Player:GetAbsOrigin()
Player:GetOrigin()
Player:GetMoney()
Player:GetMoveType()
Player:GetEyePos()
Player:GetName()
Player:GetAngles()
Player:GetTeamNum()
Player:GetWeapon()
Player:GetBoundingBox()
Player:GetStaticBox()
Player:GetHitboxPos(int hitbox)
Player:GetSteamID64()
Player:GetDormantAlpha()
Player:GetAbsVelocity()
Player:GetVelocity()
Player:GetSimulationTime()
Player:GetOldSimulationTime()
Player:GetPropBool(int offset)
Player:GetPropInt(int offset)
Player:GetPropFloat(int offset)
Player:GetPropDouble(int offset)
Player:GetPropShort(int offset)
Player:GetPropVector(int offset)
Player:GetPropAngle(int offset)
Player:SetPropInt(int offset, int i)
Player:SetPropShort(int offset, short i)
Player:SetPropAngle(int offset, QAngle ang)
Player:SetPropDouble(int offset, double i)
Player:SetPropBool(int offset, bool i)
Player:SetPropFloat(int offset, float i)
Player:SetPropVector(int offset, Vector i)
Player:GetAnimState()
Player:GetMissedShots()

Weapon class

Weapon:IsValidPtr()
Weapon:IsKnife()
Weapon:IsGrenade()
Weapon:IsZeus()
Weapon:IsReloading()
Weapon:GetIndex()
Weapon:GetSpread()
Weapon:GetInaccuracy()
Weapon:GetAbsOrigin()
Weapon:GetOrigin()
Weapon:GetName()
Weapon:GetZoomLevel()
Weapon:GetNextPrimaryAttack()
Weapon:GetNextSecondaryAttack()
Weapon:GetItemDefinitionIndex()
Weapon:GetBoundingBox()
Weapon:GetStaticBox()
Weapon:GetPropBool(int offset)
Weapon:GetPropInt(int offset)
Weapon:GetPropFloat(int offset)
Weapon:GetPropDouble(int offset)
Weapon:GetPropShort(int offset)
Weapon:GetPropVector(int offset)
Weapon:GetPropAngle(int offset)
Weapon:SetPropInt(int offset, int i)
Weapon:SetPropShort(int offset, short i)
Weapon:SetPropAngle(int offset, QAngle ang)
Weapon:SetPropDouble(int offset, double i)
Weapon:SetPropBool(int offset, bool i)
Weapon:SetPropFloat(int offset, float i)
Weapon:SetPropVector(int offset, Vector i)

Entity class

Entity:IsValidPtr()
Entity:GetIndex()
Entity:GetBoundingBox()
Entity:GetStaticBox()
Entity:GetPropBool(int offset)
Entity:GetPropInt(int offset)
Entity:GetPropFloat(int offset)
Entity:GetPropDouble(int offset)
Entity:GetPropShort(int offset)
Entity:GetPropVector(int offset)
Entity:GetPropAngle(int offset)
Entity:SetPropInt(int offset, int i)
Entity:SetPropShort(int offset, short i)
Entity:SetPropAngle(int offset, QAngle ang)
Entity:SetPropDouble(int offset, double i)
Entity:SetPropBool(int offset, bool i)
Entity:SetPropFloat(int offset, float i)
Entity:SetPropVector(int offset, Vector i)

Convar class

Convar:GetBool()
Convar:GetInt()
Convar:GetFloat()
Convar:GetString()
Convar:SetBool(bool v)
Convar:SetInt(int v)
Convar:SetFloat(float v)
Convar:SetString(string v)

Event class

Event:GetName()
Event:GetBool()
Event:GetInt()
Event:GetFloat()
Event:GetString()

UserCmd class

UserCmd.command_number
UserCmd.tick_count
UserCmd.viewangles
UserCmd.forwardmove
UserCmd.sidemove
UserCmd.upmove
UserCmd.buttons
UserCmd.random_seed
UserCmd.mousedx
UserCmd.mousedy

AnimState class

AnimState.m_flLastClientSideAnimationUpdateTime
AnimState.m_iLastClientSideAnimationUpdateFramecount
AnimState.m_flEyePitch
AnimState.m_flEyeYaw
AnimState.m_flPitch
AnimState.m_flGoalFeetYaw
AnimState.m_flCurrentFeetYaw
AnimState.m_flCurrentTorsoYaw
AnimState.m_flUnknownVelocityLean
AnimState.m_flLeanAmount
AnimState.m_flFeetCycle
AnimState.m_flFeetYawRate
AnimState.m_fDuckAmount
AnimState.m_fLandingDuckAdditiveSomething
AnimState.m_vOrigin
AnimState.m_vLastOrigin
AnimState.m_vVelocityX
AnimState.m_vVelocityY
AnimState.speed_2d
AnimState.flUpVelocity
AnimState.m_flSpeedNormalized
AnimState.m_flFeetSpeedForwardsOrSideWays
AnimState.m_flFeetSpeedUnknownForwardOrSideways
AnimState.m_flTimeSinceStartedMoving
AnimState.m_flTimeSinceStoppedMoving
AnimState.m_bOnGround
AnimState.m_bInHitGroundAnimation
AnimState.m_flLastOriginZ
AnimState.m_flHeadHeightOrOffsetFromHittingGroundAnimation
AnimState.m_flStopToFullRunningFraction
AnimState.m_flUnknownFraction

QAngle class

QAngle.pitch
QAngle.yaw
QAngle.roll
QAngle:Length()
QAngle:LengthSqr()
QAngle:IsZero(float tolerance = 0.01f)
QAngle:Normalize()

Vector class

Vector.x
Vector.y
Vector.z
Vector:Length()
Vector:LengthSqr()
Vector:Length2D()
Vector:Length2DSqr()
Vector:IsZero(float tolerance = 0.01f)
Vector:IsValid()
Vector:Zero()
Vector:DistTo(const Vector &vOther)
Vector:DistToSqr(const Vector &vOther)
Vector:Cross(const Vector& vOther)
Vector:Normalize()

RECT class

RECT.left
RECT.top
RECT.right
RECT.bottom

mdl.ReplacePath

-- model1, model2
local function model_changer()
  -- replaces model1 to model2
  mdl.ReplacePath("knife_default_ct.mdl", "models/weapons/v_minecraft_pickaxe.mdl")
  mdl.ReplacePath("knife_default_t.mdl", "models/weapons/v_minecraft_pickaxe.mdl")
end
client.RegisterCallback("find_mdl", model_changer)

ui.Checkbox

-- Label, variable name, default value
ui.Checkbox("Label", "b_variable", false)
ui.GetBool("b_variable") -- returns the checkbox state

ui.SliderInt

-- Label, variable name, min value, max value, default value
ui.SliderInt("Label", "i_variable", 0, 10, 0)
ui.GetInt("i_variable") -- returns the slider value

ui.SliderFloat

-- Label, variable name, min value, max value, default value
ui.SliderFloat("Label", "flt_variable", 0.0, 10.0, 0.0)
ui.GetFloat("flt_variable") -- returns the slider value

ui.KeyBind

-- Label, variable name
ui.KeyBind("Label", "i_key")

local key = ui.GetInt("i_key") -- returns the key
client.IsKeyPressed(key) -- returns the pressed state

ui.Combo

-- Label, variable name, strings array, default value
ui.Combo("Label", "i_variable", { "Item1", "Item2", "Item3" }, 0)
ui.GetInt("i_variable") -- returns the combo value

ui.InputText

-- Label, variable name, default value
ui.InputText("Label", "str_variable", "default")
ui.GetString("str_variable") -- returns the input value

ui.GetBool

local var = ui.GetBool("var") -- returns the added variable state

ui.GetInt

local var = ui.GetInt("var") -- returns the added variable value

ui.GetFloat

local var = ui.GetFloat("var") -- returns the added variable value

ui.GetString

local var = ui.GetString("var") -- returns the added variable value

ui.SetBool

ui.SetBool("var", true) -- setting the added variable state

ui.SetInt

ui.SetInt("var", 5) -- setting the added variable value

ui.SetFloat

ui.SetFloat("var", 5.0) -- setting the added variable value

ui.SetString

ui.SetString("var", "hello") -- setting the added variable value

surface.GetCursorPos

local x, y = surface.GetCursorPos() -- returns the cursor position

surface.SetupFont

-- fontname, tall, weight, blur, scanlines, flags
local font = surface.SetupFont("Tahoma", 16, 500, 0, 1, 0x200) 
-- surface font flags: https://developer.valvesoftware.com/wiki/EFontFlags

surface.DrawFilledRect

 -- start_pos_x, start_pos_y, end_pos_x, end_pos_y
surface.DrawSetColor(255, 0, 0, 255) 
surface.DrawFilledRect(5, 5, 10, 10)

surface.DrawFilledRectFade

-- start_pos_x, start_pos_y, end_pos_x, end_pos_y, first_alpha, next_alpha, is_horisontal
surface.DrawSetColor(255, 0, 0, 255) 
surface.DrawFilledRectFade(5, 5, 10, 10, 255, 0, false) 

surface.DrawOutlinedRect

-- start_pos_x, start_pos_y, end_pos_x, end_pos_y
surface.DrawSetColor(255, 0, 0, 255) 
surface.DrawOutlinedRect(5, 5, 10, 10) 

surface.DrawSetColor

-- red, green, blue, alpha
surface.DrawSetColor(255, 0, 0, 255) -- setting color of the next drawing element

surface.GetTextSize

-- font, text
local w, h = surface.GetTextSize(font, text) -- returns width and height text size

surface.DrawLine

-- start_pos_x, start_pos_y, end_pos_x, end_pos_y
surface.DrawSetColor(255, 0, 0, 255)
surface.DrawLine(5, 5, 20, 5) -- drawing horisontal line

surface.DrawOutlinedCircle

-- pos_x, pos_y, radius, segments
surface.DrawSetColor(255, 0, 0, 255)
surface.DrawOutlinedCircle(20, 20, 10, 10) -- drawing the circle

surface.DrawSetTextFont

-- font from setupfont
surface.DrawSetTextFont(font) -- setting the next text font

surface.DrawSetTextColor

-- red, green, blue, alpha
surface.DrawSetTextColor(255, 0, 0, 255) -- setting the next text color

surface.DrawSetTextPos

-- x, y
surface.DrawSetTextPos(10, 10) -- setting the next text position

surface.DrawPrintText

surface.DrawPrintText("Testing") -- drawing the text

engine.GetLevelNameShort

local name = engine.GetLevelNameShort() -- returns the current map name

engine.GetPlayerIndexByUserID

-- userID
local index = engine.GetPlayerIndexByUserID(userID) -- returns the entity index

engine.GetPlayerIndexByUserID

-- userID
local index = engine.GetPlayerIndexByUserID(userID) -- returns the entity index

engine.GetLocalPlayer

local index = engine.GetLocalPlayer() -- returns the localplayer index

engine.GetScreenSize

local w, h = engine.GetScreenSize() -- returns the screen size

engine.GetViewAngles

local view = engine.GetViewAngles() -- returns the camera angles

engine.SetViewAngles

-- viewangle
engine.SetViewAngles(viewangle) -- setting the camera angles

engine.IsConnected

local connected = engine.IsConnected() -- returns the connected state

engine.IsInGame

local isInGame = engine.IsInGame() -- returns the IsInGame state

engine.ExecuteClientCmd

-- string
engine.ExecuteClientCmd("echo test") -- printing "test" in console

clientstate.ForceFullUpdate

clientstate.ForceFullUpdate() -- calling cl_fullupdate

clientstate.chokedcommands

local choked = clientstate.chokedcommands() -- returns the choked commands

globalvars.realtime

local realtime = globalvars.realtime() -- returns the client time

globalvars.framecount

local framecount = globalvars.framecount() -- returns the frame count

globalvars.absoluteframetime

local absoluteframetime = globalvars.absoluteframetime() -- returns the absolute frame time

globalvars.absoluteframestarttimestddev

local absoluteframestarttimestddev = globalvars.absoluteframestarttimestddev() -- returns the absolute frame start time

globalvars.curtime

local curtime = globalvars.curtime() -- returns the server time

globalvars.frametime

local frametime = globalvars.frametime() -- returns the frame time

globalvars.maxClients

local maxClients = globalvars.maxClients() -- returns the max clients value

globalvars.tickcount

local tickcount = globalvars.tickcount() -- returns the current tickcount

globalvars.interval_per_tick

local interval_per_tick = globalvars.interval_per_tick() -- returns the interval per tick

globalvars.interpolation_amount

local interpolation_amount = globalvars.interpolation_amount() -- returns the interpolation amount

client.IsValveDS

local isvalveds = client.IsValveDS() -- returns the is a valve server or not

client.IsKeyPressed

-- key code: https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
local isPressed = client.IsKeyPressed(key) -- returns the pressed state

client.IsVisible

-- pos, player
local isEntityVisible = client.IsVisible(pos, player) -- returns the visible state

client.GetTimeStamp

local timestamp = client.GetTimeStamp() -- returns the unix timestamp

client.GetSystemTime

local hours, minutes, seconds = client.GetSystemTime() -- returns the windows time

client.GetFOV

-- viewAngle, aimAngle
local fov = client.GetFOV(viewAngle, aimAngle) -- returns the fov from viewangle to aimAngle

client.GetLatency

local latency = client.GetLatency() -- returns the current latency

client.GetUsername

local name = client.GetUsername() -- returns your cheat username

client.GetConvar

-- cvar name
local cvar = client.GetConvar("cl_interp") -- returns the ConVar object

client.GetNetvar

-- table, netvar
local offset = client.GetNetvar("DT_BasePlayer", "m_iHealth") -- returns the m_iHealth offset
player:GetPropInt(offset) -- returns the player health

client.GetSendPacket

local send = client.GetSendPacket() -- returns the current packet stage

client.SetSendPacket

client.SetSendPacket(true) -- setting the sendpacket stage

client.SetClantag

-- clantag
client.SetClantag("test") -- setting the ingame clantag

client.SetName

-- name
client.SetName("test") -- setting the ingame name

client.RegisterCallback

-- callback_name, function
function on_paint()
    surface.DrawSetColor(255, 0, 0, 255) 
    surface.DrawFilledRect(5, 5, 10, 10)
end
client.RegisterCallback("paint_traverse", on_paint)

client.Notification

-- message
client.Notification("Hello, world!") -- pushing the notification

client.AddToRadioList

-- text, radiourl
client.AddToRadioList(text, radiourl) -- adding your channel to radio list

client.RandomInt

-- min, max
local random = client.RandomInt(0, 10) -- returns the random number

client.RandomFloat

-- min, max
local random = client.RandomFloat(0.0, 10.0) -- returns the random number

client.LoadScript

-- script name
client.LoadScript("clantag.lua") -- loading the script

client.UnloadScript

-- script name
client.UnloadScript("clantag.lua") -- unloading the script

client.LoadConfig

-- cfg name
client.LoadConfig("default.nixware") -- loading the config

client.WorldToScreen

-- 3d_pos
local pos_2d = client.WorldToScreen(pos_3d) -- returns the screen position by world position

client.CalcAngle

-- src, dst
local angle = client.CalcAngle(eye_position, target_position) -- returns the angle by pos

client.FindIDAPattern

-- modulename, pattern, offset
local addr = client.FindIDAPattern("client_panorama.dll", "8B 35 ? ? ? ? 66 3B D0 74 07", 2) -- returns the address by IDA pattern

client.FindCodePattern

-- modulename, pattern, mask, offset
local addr = client.FindCodePattern("engine.dll", "\x8D\x4C\x24\x1C\xE8\x00\x00\x00\x00\x56", "xxxxx????x", 0) -- returns the address by code pattern

entitylist.GetPlayerByIndex

-- index
local player = entitylist.GetPlayerByIndex(index) -- returns the Player object

entitylist.GetWeaponByIndex

-- index
local weapon = entitylist.GetWeaponByIndex(index) -- returns the Weapon object

entitylist.GetEntityByIndex

-- index
local entity = entitylist.GetEntityByIndex(index) -- returns the Entity object

entitylist.GetHighestEntityIndex

local idx = entitylist.GetHighestEntityIndex() -- returns the highest entity index

entitylist.GetPlayers

-- type
-- 0 - enemies only
-- 1 - teammates only
-- 2 - all players
local players = entitylist.GetPlayers(type) -- returns the players array
for i = 1, #players do
    local player = players[i]
end

entitylist.GetLocalPlayer

local localplayer = entitylist.GetLocalPlayer() -- returns the local player object

entitylist.GetEntitiesByClass

-- classname
local entities = entitylist.GetEntitiesByClass(classname) -- returns the entities array
for i = 1, #entities do
    local entity = entities[i]
end

entitylist.GetEntitiesByClassID

-- classid
local entities = entitylist.GetEntitiesByClass(classid) -- returns the entities array
for i = 1, #entities do
    local entity = entities[i]
end

netchannel.SetTimeout

-- seconds, forceExact 
netchannel.SetTimeout(seconds, forceExact)

netchannel.RequestFile

-- filename, isReplayDemo 
netchannel.RequestFile(filename, isReplayDemo)

Callbacks

create_movement(UserCmd)
fire_game_event(Event)
frame_stage_notify(Stage)
player_resolver(Player)
paint_traverse()
find_mdl()

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages