LUtils is a powerful glua development utility designed to streamline the debugging experience
- Commands to execute and evaluate in different contexts
- Support for luadev compatible development tools
- Dynamic multi-entity targeting
- Human readable entity printing
It is extremely recommend to use this in conjunction with EPOE in order to be able to see server prints
| Command | Context | Usage |
|---|---|---|
!p code |
Server | Executes code then prints result |
!ps code |
Shared | Executes code on both self and server then prints results |
!pm code |
Client | Executes code on self then prints result |
!psc targets, code |
Clients | Excutes code on targets then prints results |
!l code |
Server | Executes code |
!ls code |
Shared | Executes code on both self and server |
!lm code |
Client | Executes code on self |
!lsc targets, code |
Clients | Executes code on targets |
- Print hooks table
!p hook.GetTable() - Print local branch
!pm BRANCH
| Targets | Result |
|---|---|
| #all | Targets every entity |
| #us | Targets everyone within 1000 blocks of you |
| #them | Same as above without yourself |
username |
Targets user with username |
- Force every player to say hello
!lsc #all, LocalPlayer():ConCommand("say hello") - Force timmy to say hello
!lsc timmy, LocalPlayer():ConCommand("say hello") - Print the current branch of every player
!psc #all, BRANCH
| Target | Type | Result |
|---|---|---|
| me | Player | Selects user of command |
| here | Vector | Current Position |
| wep | Weapon | Current Weapon |
| veh | Vehicle | Current Vehicle |
| dir | Vector | Current AimVector |
| trace | TraceResult | Current EyeTrace |
| there | Vector | TraceResult HitPos |
| this | Entity | Currently targeted entity |
username |
Player | Player with the name |
_entityID |
Entity | Entity with the entityID |
- Kill your own player
!l me:Kill() - Print entity you are looking at
!p this - Kick timmy from the server
!l timmy:Kick() - Remove the entity with the ID 1072
!l SafeRemoveEntity(_1072)
This is more complex as it allows you to call methods on more than one entity simultaneously
| Target | Result |
|---|---|
| all | Every player |
| bots | Every bot player |
| humans | Every human player |
| props | Every prop |
| these | Every prop near you |
| those | Every prop near your target |
| us | Every player near you |
| them | Every player near you, that is not you |
| npcs | Every npc |
allof(entity) |
Targets every entity of the class passed into it |
- Kick every bot online
!l bots:Kick() - Force every npc to take a thousand damage from you
!l npcs:TakeDamage(1000, me) - Delete every weapon_crowbar
!l allof("weapon_crowbar"):Remove() - Delete every players active weapon
!l all:GetActiveWeapon():Remove()
Tinylua objects are able to be manipulated for higher granularity
- Kick every admin with full function
all:filter(function(ply) ply:IsAdmin() end):Kick() - Kick every admin with function stub
all:filter('ply -> ply:IsAdmin()'):Kick()
- Get wrapped table of every active weapon
all:map('ply -> ply:GetActiveWeapon()')
- Set both the variable a and b to true on every player
all:set("a", true):set("b", true)
- Kill every player holding a crowbar
all:GetActiveWeapon():GetClass():filter('x -> x == "weapon_crowbar"'):keys():Kill()
- Get a table of every error caused by entities without physics objects
allof("*"):GetPhysicsObject():errors()
- Get a normal table of players
all:get()