When will come the new features?
Todo:
1.Set items to tag a player is not beginner.
2.Set beginner protection time.
Beginner Protection [Unmaintained]
Discussion in 'Plugin Support' started by Kation, Apr 5, 2015.
-
I suggest you to timing a player ingame or based on a build house to define when a beginner become outdated
-
[2/8/2016 6:56:20 PM] [Oxide] 6:54 PM [Error] Error while compiling BeginnerProtection.cs(6,13): error CS0234: The type or namespace name `Rust' does not exist in the namespace `Oxide'. Are you missing an assembly reference?
-
Getting this:
> oxide.reload BeginnerProtection
[Oxide] 05:49 [Error] Error while compiling BeginnerProtection.cs(219,106): error CS1503: Argument `#3' cannot convert `bool' expression to type `ulong'
are there any other plugin that do the same thing,that work? -
I'm not a developper, i have modified for beginner can attack a player:
I have added after {"IsEnabled", true},:
Code:{"BeginnerCanAttack", true},
Code:[HookMethod("OnPlayerAttack")] private object OnPlayerAttack(BasePlayer attacker, HitInfo hitInfo) { if ((bool)setting["IsEnabled"]) { if (hitInfo.HitEntity != null && hitInfo.HitEntity is BasePlayer) { BasePlayer target = (BasePlayer)hitInfo.HitEntity; if (!target.inventory.AllItems().Any(t => t.GetHeldEntity() is BaseProjectile)) { SendReply(attacker, message["DoNotAttack"]); return true; } target = attacker; if ((bool)setting["BeginnerCanAttack)"]) { if (target.inventory.AllItems().Any(t => t.GetHeldEntity() is BaseProjectile)) { Puts("attacker, Beginner " + player.displayName.ToString() + " can attack"); return true; } } else { if (!target.inventory.AllItems().Any(t => t.GetHeldEntity() is BaseProjectile)) { SendReply(attacker, message["CanNotAttack"]); return true; } } } } return null; }