错误似乎在“!self.Replace”的第一行我尝试使用时总是出错!在lua中,如果有人可以提供帮助,那就太好了。
function ENT:Think()
if ( !self.Replace ) && ( self:GetrHealth() <= 0 ) then
self.Replace = true
self.ReplaceTime = CurTime() + gMining.plugins[ "Rock Config" ].rockRespawn
self.Pos = self:GetPos()
if gMining.plugins[ "Rock Config" ].despawn then
self:SetPos( self:GetPos() + Vector( 0, 0, -300 ) )
elseif !gMining.plugins[ "Rock Config" ].despawn then
self:SetRenderMode(RENDERMODE_TRANSADDFRAMEBLEND)
if ( gMining.plugins[ "Rock Config" ].customColor == true ) then
if gMining.mineralDB[ "gMining."..self.name ].enable == true then
self:SetColor( Color( gMining.mineralDB[ "gMining."..self.name ].color.r, gMining.mineralDB[ "gMining."..self.name ].color.g, gMining.mineralDB[ "gMining."..self.name ].color.b, gMining.plugins[ "Rock Config" ].rockTransparency ) )
end
else
self:SetColor( Color( 255, 255, 255, gMining.plugins[ "Rock Config" ].rockTransparency ) )
end
self:Setvisible( 0 )
end
end;