Skip to content

Commit ab51519

Browse files
authored
Add more arguments to Wire_CanName (#3384)
Without this the hook is unuseful a bit
1 parent 0ca7c96 commit ab51519

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lua/entities/gmod_wire_expression2/core/entity.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,9 +791,8 @@ end
791791
e2function void entity:podSetName(string name)
792792
if not IsValid(this) or not this:IsVehicle() or not this.VehicleTable or not this.VehicleTable.Name then return self:throw("Invalid vehicle!", nil) end
793793
if not isOwner(self, this) then return self:throw("You do not own this entity!", nil) end
794-
if hook.Run("Wire_CanName") == false then return self:throw("A hook prevented this function from running") end
795-
name = name:sub(1,200)
796-
this.VehicleTable.Name = name
794+
if hook.Run("Wire_CanName", name, this, self.player) == false then return self:throw("A hook prevented this function from running") end
795+
this.VehicleTable.Name = name:sub(1, 200)
797796
end
798797

799798
--[[******************************************************************************]]

0 commit comments

Comments
 (0)