i'm now trying to make it so you can't get hurt if you didn't login and it turns out realy good exept that i don't know how to disable fall damage and hunger damage. the mob and player damage is already done.
i added this for the mob and player damage:
i added this for the mob and player damage:
function OnTakeDamage(Receiver, TDI)
-- log the damage to server log:
LOG("Damage: Raw ".. TDI.RawDamage .. ", Final:" .. TDI.FinalDamage)
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cSpider")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cZombie")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cCreeper")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cSkeleton")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cCavespider")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cBlaze")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cEnderman")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cGhast")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cMagmacube")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cSilverfish")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cSlime")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cWitch")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cZombiepigman")) then
TDI.FinalDamage = 0
end
if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cPlayer")) then
TDI.FinalDamage = 0
end
end

