- Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathexample.lua
More file actions
Latest commit
24 lines (18 loc) · 783 Bytes
/
Copy pathexample.lua
File metadata and controls
24 lines (18 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- file: example.lua
-- usage: test this script with a source engine game.
localfirsttick=true
functionMainCallbackFunction( )
if( firsttick==true ) then
print( "print from MainCallbackFunction" )
firsttick=false
end
end
if( Process.RegisterModule( "client.dll" ) ==trueandProcess.RegisterModule( "engine.dll" ) ==true ) then
localClientBase, ClientSize=Process.GetModuleData( "client.dll" )
print( string.format( "found client.dll at 0x%X, size: 0x%X", ClientBase, ClientSize ) )
localEngineBase, EngineSize=Process.GetModuleData( "engine.dll" )
print( string.format( "found engine.dll at 0x%X, size: 0x%X", EngineBase, EngineSize ) )
if( ClientBase~=0andEngineBase~=0 ) then
RegisterCallbackFunction( "MainCallbackFunction" )
end
end