Update fm_nicesmartweld

This commit is contained in:
[TW]Rain_Bob 2023-10-04 23:14:48 +08:00 committed by GitHub
parent ce5cd12e43
commit 8e4993da27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,7 +204,12 @@ function TOOL:LeftClick(tr)
end
if self:GetOwner():KeyDown(IN_USE) then
return self:AutoSelect(tr.Entity)
if(self:GetOwner():IsAdmin())then
return self:AutoSelect(tr.Entity)
else
self:GetOwner():PrintMessage(4,"Opps! you cannot auto select,sorry!")
return
end
end
return self:HandleProp(tr)
@ -342,6 +347,10 @@ function TOOL:PerformWeld(tr)
if #self.SelectedProps < 2 then
return
end
if #self.SelectedProps > 35 then
self:GetOwner():PrintMessage(4,"Too many props! what the hell??")
return
end
if weldToWorld then
local world = game.GetWorld()