[ConsoleCommand("UI_CREATE_TRAP")]
private void cmd_UI_CREATE_TRAP(ConsoleSystem.Arg arg)
{
BasePlayer player = arg.Player();
if (player == null) return;
var act = arg.Args[0];
var id = Convert.ToUInt64(arg.GetString(1));
if (act == "show")
{
CreateCraftTrap(player, id);
return;
}
That's how it worked, I'll keep checking...
When creating a trap it gives an error
Failed to call hook 'cmd_UI_CREATE_TRAP' on plugin 'MyAnimalFarm v2.0.4' (InvalidCastException: Specified cast is not valid.)
at System.Convert.ToUInt64 (System.Object value) [0x00003] in <41d29b352f6a475ab1bf7c6628b82790>:0
at Oxide.Plugins.MyAnimalFarm.cmd_UI_CREATE_TRAP (ConsoleSystem+Arg arg) [0x00024] in <d5f2302f66b249ce83e59eab2f1a1ff3>:0
at Oxide.Plugins.MyAnimalFarm.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00f0f] in <d5f2302f66b249ce83e59eab2f1a1ff3>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <42f9bedc659b4f4786eb778d3cd58968>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <15f61ddda771464d8246ebdce8ff4811>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <15f61ddda771464d8246ebdce8ff4811>:0
Error while compiling MyAnimalFarm: The type or namespace name 'AiManagedAgent' could not be found (are you missing a using directive or an assembly reference?) | Line: 789, Pos: 48
I have a GasStationEvent of the latest version on my server, but the bots are no longer killed after the npcspawn update. I don't understand what to do with it.
Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.