ToDo Lists
#17
Why explosion damages players in creative mode?  Huh
I even made a plugin what fixes it, because it's wery annoying. This plugin fixes knockback too. Here the code:
Code:
local hooks={} local TDItable={"Attacker","DamageType","FinalDamage","Knockback","RawDamage"} function hooks.take_damage(e,d)  if e:IsPlayer() and e and e:isGamemodeCreative() then    return true  else    --LOG("Damage!")    --for k,v in pairs(TDItable) do    --  LOG("\t"..v.."="..tostring(d[v]))    --end    if d.DamageType==dtAttack or d.DamageType==dtArrowAttack then      e:SetSpeed(0,0,0)      d.Knockback.y=5      --d.Knockback=d.Knockback*5    end    return false  end end function Initialize(Plugin) Plugin:SetName("LogicFix") Plugin:SetVersion(1) -- Hooks  if hooks then    for k,v in pairs(hooks) do      cPluginManager.AddHook(cPluginManager["HOOK_"..string.upper(k)], v)    end  end PLUGIN = Plugin -- NOTE: only needed if you want OnDisable() to use GetName() or something like that -- Command Bindings  if commands then    for k,v in pairs(commands) do      cPluginManager.BindCommand(unpack(v))    end  end LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion()) return true end function OnDisable() LOG(PLUGIN:GetName() .. " is shutting down...") end
Reply
Thanks given by:


Messages In This Thread
ToDo Lists - by LogicParrot - 10-05-2015, 04:34 PM
RE: ToDo Lists - by LogicParrot - 10-05-2015, 05:23 PM
RE: ToDo Lists - by NiLSPACE - 10-05-2015, 05:26 PM
RE: ToDo Lists - by LogicParrot - 10-05-2015, 05:29 PM
RE: ToDo Lists - by NiLSPACE - 10-05-2015, 05:34 PM
RE: ToDo Lists - by LogicParrot - 10-05-2015, 05:40 PM
RE: ToDo Lists - by NiLSPACE - 10-05-2015, 06:00 PM
RE: ToDo Lists - by Seadragon91 - 11-04-2015, 07:25 AM
RE: ToDo Lists - by LogicParrot - 11-29-2015, 05:20 PM
RE: ToDo Lists - by tonibm19 - 11-29-2015, 07:08 PM
RE: ToDo Lists - by Seadragon91 - 11-29-2015, 07:32 PM
RE: ToDo Lists - by tonibm19 - 11-29-2015, 07:48 PM
RE: ToDo Lists - by Seadragon91 - 11-29-2015, 08:02 PM
RE: ToDo Lists - by TC1061 - 01-09-2018, 02:43 AM
RE: ToDo Lists - by peterbell10 - 01-09-2018, 04:56 AM
RE: ToDo Lists - by xoft - 01-09-2018, 04:40 PM



Users browsing this thread: 1 Guest(s)