[list]
[*]Updated feature descriptions
[/list]
GUI Console
[list]
[*]Improved command input helper
[*]Added unbind, unbindhold, unbindtoggle to avoid confusion
[/list]
Lua Scripting
[list]
[*]Fixed rare crash in lua gui code
[*]Added 3D vector math library
[list]
[*]vector.Add
[*]vector.Subtract
[*]vector.Multiply
[*]vector.Divide
[*]vector.Length
[*]vector.LengthSqr
[*]vector.Distance
[*]vector.Angles
[*]vector.AngleForward
[*]vector.AngleRight
[*]vector.AngleUp
[*]vector.AngleNormalize
[/list]
[*]Added SendStringCmd callback
[/list]
Example:
print( vector.Length( 100, 100, 100 ) );
print( vector.Add( { 0, 0, 0 }, { 100, 100, 100 } ) );
print( vector.Add( { 0, 0, 0 }, 100 ) );
print( vector.Distance( 0, 0, 0, 100, 100, 100 ) );
print( vector.Distance( { 0, 0, 0 }, { 100, 100, 100 } ) );
local function OnDrawESP( builder )
local ent = builder:GetEntity();
local localply = entities.GetLocalPlayer();
builder:AddTextTop( "Distance: " .. vector.Distance( {ent:GetAbsOrigin()}, {localply:GetAbsOrigin()} ) );
end
callbacks.Register( "DrawESP", OnDrawESP );
callbacks.Register( "SendStringCmd", function( cmd )
-- replace "no" with "yes"
if string.find( cmd:Get(), "say \"no\"" ) == 1 then
cmd:Set( "say \"yes\"" );
end
end )
callbacks.Register( "SendStringCmd", function( cmd )
if string.find( cmd:Get(), "say" ) == 1 then
cmd:Set( "" ); -- chat message wont be sent
end
end )