Jump to content

Magnumk

Creator
  • Posts

    225
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Magnumk

  1. Magnumk

    Explosive Chest

    I needed to change the command section to be able to sell this item from shop. #region Commands [ConsoleCommand("give.echest")] void GiveExplosiveChest(ConsoleSystem.Arg arg) { if (arg.Args == null || arg.Args.Length < 1) { Puts("Usage: give.echest <SteamID>"); return; } ulong steamId; if (!ulong.TryParse(arg.Args[0], out steamId)) { Puts("Invalid SteamID provided."); return; } BasePlayer targetPlayer = BasePlayer.FindByID(steamId); if (targetPlayer == null) { Puts($"No player found with SteamID {steamId}."); return; } BasePlayer commandExecutor = arg.Player(); // Check if the command is executed from the server console if (commandExecutor == null) { targetPlayer.inventory.GiveItem(ItemManager.Create(ItemManager.FindItemDefinition("box.wooden"), 1, config.SkinId)); return; } // If executed by an in-game player, check for permissions if (commandExecutor.IsAdmin || commandExecutor.IPlayer.HasPermission("explosivechest.give")) targetPlayer.inventory.GiveItem(ItemManager.Create(ItemManager.FindItemDefinition("box.wooden"), 1, config.SkinId)); else Puts("You don't have permission to execute this command."); } [ConsoleCommand("give.echest.large")] void GiveExplosiveChestLarge(ConsoleSystem.Arg arg) { if (arg.Args == null || arg.Args.Length < 1) { Puts("Usage: give.echest.large <SteamID>"); return; } ulong steamId; if (!ulong.TryParse(arg.Args[0], out steamId)) { Puts("Invalid SteamID provided."); return; } BasePlayer targetPlayer = BasePlayer.FindByID(steamId); if (targetPlayer == null) { Puts($"No player found with SteamID {steamId}."); return; } BasePlayer commandExecutor = arg.Player(); // Check if the command is executed from the server console if (commandExecutor == null) { targetPlayer.inventory.GiveItem(ItemManager.Create(ItemManager.FindItemDefinition("box.wooden.large"), 1, config.SkinId)); return; } // If executed by an in-game player, check for permissions if (commandExecutor.IsAdmin || commandExecutor.IPlayer.HasPermission("explosivechest.give")) targetPlayer.inventory.GiveItem(ItemManager.Create(ItemManager.FindItemDefinition("box.wooden.large"), 1, config.SkinId)); else Puts("You don't have permission to execute this command."); } #endregion
  2. Thanks! Sorry for that basic fault… don’t know why I didn’t try that
  3. Magnumk

    Tiers Mode

    Does it support Economics plugin? So that you can set a price for players to pay for upgrading tiers rather than time? And Is it possible to specify which material the user can upgrade their base with? Example, Tier 1: - able to use/upgrade stone on construction Tier 2: - Metall Tier 3: - HQM
  4. I get errors when installing the new version. [ATMSystem] Looking for possible ATM's... Failed to call hook 'OnServerInitialized' on plugin 'ATMSystem v2.0.11' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.ATMSystem.OnServerInitialized () [0x00040] in <d8cd49a21cdf4815a0f2bcb7e1fba87b>:0 at Oxide.Plugins.ATMSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0006a] in <d8cd49a21cdf4815a0f2bcb7e1fba87b>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <e3740cd7ab6f40909737d74eeeaf1a8a>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <032ab7611607468ebf42c14e3cf9df20>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <032ab7611607468ebf42c14e3cf9df20>:0 Calling 'OnServerInitialized' on 'ATMSystem v2.0.11' took 1054ms
  5. Magnumk

    Failed compiling

    I thoughts so, I will go back to previous version and post the error at Carbon community and see if they can get it to work with changes in Carbon
  6. Magnumk

    Failed compiling

    I get errors when trying to load, previous version worked fine. If this is Carbon related I will seek answers there. (22:14:59) | [CRBN] Loading plugin 'XSkinMenu'... (22:14:59) | Failed compiling '/home/rustserver/serverfiles/carbon/plugins/XSkinMenu.cs': (22:14:59) | 1. Missing close delimiter '}' for interpolated expression started with '{'. [CS8076] (XSkinMenu 127 line 2483) (22:15:00) | 2. A conditional expression cannot be used directly in a string interpolation because the ':' ends the interpolation. Parenthesize the conditional expression. [CS8361] (XSkinMenu 129 line 2483) (22:15:00) | 3. Syntax error, ',' expected [CS1003] (XSkinMenu 177 line 2483) (22:15:00) | 4. A format specifier may not contain trailing whitespace. [CS8088] (XSkinMenu 162 line 2483) (22:15:00) | 5. The name 'vip_to_default' does not exist in the current context [CS0103] (XSkinMenu 177 line 2483) (22:15:00) | 6. Invalid initializer member declarator [CS0747] (XSkinMenu 177 line 2483)
  7. Magnumk

    Failed: OnServerInitialized

    (07:56:02) | Loaded plugin Hud v2.1.18 by AhigaO#4485 [292ms] (07:56:02) | Failed to call internal hook 'OnServerInitialized' on plugin 'Hud v2.1.18' Note that I'm running Carbon so it may be the problem? //Regards
  8. Magnumk

    buyraid UI gone

    Hi I can’t find thread that you are referring to? I got this issue when I migrated to Carbon, is there a solution?
  9. Magnumk

    Icon broken after patch

    Same here, picture and icons do now show
  10. Magnumk

    Can't upgrade to 2.0.10

    I've download the file 2.0.10 but I can't get it to upgrade from 2.0.9 --> 2.0.10. I'm replacing the Hud.cs in plugin directory as always but console keeps just saying: (20:33:40) | Hud was compiled successfully in 2844ms (20:33:40) | Unloaded plugin Hud v2.0.9 by AhigaO#4485 (20:33:41) | Calling 'OnServerInitialized' on 'Hud v2.0.9' took 251ms [GARBAGE COLLECT] (20:33:41) | Loaded plugin Hud v2.0.9 by AhigaO#4485 I've tried to delete config file and upgrade as well, but same result... What am I missing

About Us

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.

Downloads
2.7m
Total downloads
Customers
11.6k
Customers served
Files Sold
165.4k
Total sales
Payments
3.6m
Processed total
×
×
  • Create New...

Important Information

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.