Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Denneisk committed Oct 6, 2023
1 parent 556f17d commit b9ea39e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,15 @@ local countLookup = {


local function checkEnts(self, ent1, ent2)

if not (ent1 and ent2) then return self:throw("Invalid entity (nil)!", false) end
if not ent1 or not ent2 then return self:throw("Invalid entity!", false) end

if not ent1:IsWorld() then
if not IsValid(ent1) then return self:throw("Invalid entity!", false) end
if not ent1:IsValid() then return self:throw("Invalid entity!", false) end
if not isOwner(self, ent1) then return self:throw("You are not the owner of the entity!", false) end
end

if not ent2:IsWorld() then
if not IsValid(ent2) then return self:throw("Invalid target entity!", false) end
if not ent2:IsValid() then return self:throw("Invalid target entity!", false) end
if not isOwner(self, ent2) then return self:throw("You are not the owner of the target entity!", false) end
end

Expand Down

0 comments on commit b9ea39e

Please sign in to comment.