client
General cheat-related functions
🚧 API of this file is not finished yet and could be changed in any time
Functions
RegisterCallback
List:
Name
Arguments
Description
Paint
-
primitives drawing
FrameStageNotify
nStage
called on every frame stage
Destroy
-
called on current script unload
Parameters:
Name
Type
Description
szCallbackName
string
name of callback where function will be called
pFunction
function
function to be called within callback
Code:
local flRainbow = 0.001
Client.RegisterCallback("Paint", function()
if (flRainbow >= 1.0) then
flRainbow = 0.0 -- clamp
else
flRainbow = flRainbow + 0.001
end
local colRainbow = Color.FromHSB(flRainbow, 1.0, 1.0, 1.0)
Draw.AddCircle(Vector2D.new(150.0, 150.0), 50.0, colRainbow, 12, bit.bor(ECircleRenderFlags.DRAW_CIRCLE_FILLED, ECircleRenderFlags.DRAW_CIRCLE_OUTLINE))
end)
RegisterEventCallback
List: CS:GO Game Events
Arguments: IGameEvent*
Parameters:
Name
Type
Description
szEventName
string
name of event where on trigger function will be called
pFunction
function
function to be called on event trigger
Code:
Client.RegisterEventCallback("player_death", function(pEvent)
local localPlayer = IEngine.GetLocalPlayer()
local nAttackerID = IEngine.GetPlayerForUserId(pEvent.GetInt("attacker"))
local nDeadID = IEngine.GetPlayerForUserId(pEvent.GetInt("userid"))
if nAttackerID == nDeadID or nAttackerID ~= localPlayer then
return
end
IEngine.ExecuteClientCmd('say trashtalk on kill')
end)
LoadScript
Parameters:
Name
Type
Description
szScriptName
string
name of script to load
Code:
Client.LoadScript("qo0.lua")
UnloadScript
Parameters:
Name
Type
Description
szScriptName
string
name of script to unload
Code:
Client.UnloadScript("qo0.lua")
FindPattern
Parameters:
Name
Type
Description
szModule
string
name of module to search signature in
szSignature
string
IDA style signature to search
Returns:
Type
Description
unsigned int
address of given pattern
Code:
local ffi = require("ffi")
local oSetClanTag = ffi.cast('int(__fastcall*)(const char*, const char*)', Client.FindPattern('engine.dll', '53 56 57 8B DA 8B F9 FF 15'))
Client.RegisterCallback("CreateMovePre", function(pCmd)
oSetClanTag('baimless', 'baimless')
end)
CaptureInterface
Parameters:
Name
Type
Description
szModule
string
name of module where interface defined
szInterface
string
name of interface to capture
Returns:
Type
Description
void*
pointer of captured interface
Code:
local ffi = require("ffi")
ffi.cdef[[
struct IGameConsole
{
virtual ~IGameConsole() { }
virtual void Activate() = 0; // activates the console, makes it visible and brings it to the foreground
virtual void Initialize() = 0;
virtual void Hide() = 0; // hides the console
virtual void Clear() = 0; // clears the console
virtual bool IsConsoleVisible() = 0; // return true if the console has focus
virtual void SetParent(int iParent) = 0;
};
]]
local IGameConsole = ffi.cast('IGameConsole*', Client.CaptureInterface('client.dll', 'GameConsole'))
IGameConsole.Clear()
GetCheatUserName
Returns:
Type
Description
string
cheat username
Code:
local szUserName = Client.GetCheatUserName()
print(szUserName)
Last updated
Was this helpful?