OK versteh nicht ganz was du meinst hab im moment folgendes:
Plugin lädt:
function PLUGIN:Init()
print( self.Title .. " v" .. self.Version .. ": successfully initialized! Enjoy!" )
self:AddChatCommand( "dmgbypasson", self.dmgbyon )
self:AddChatCommand( "dmgbypassoff", self.dmgbyoff )
end
Damage wird ausgeschaltet :
function PLUGIN:dmgbyon(takedamage, damage)
if (damage.attacker.client and damage.victim.client) then
local victim = damage.victim.client.netUser
local attacker = damage.attacker.client.netUser
if (victim and attacker and victim ~= attacker and self:isAdmin(victim) and self:isAdmin(attacker)) then
rust.InventoryNotice( attacker, "ADMIN!" )
if (damage.amount > 0) then damage.amount = 0 end
if (damage.status ~= LifeStatus.IsAlive) then damage.status = LifeStatus.IsAlive end
end
end
return damage
end
Damage wieder an fehlt mir noch