1. Guys help please. This is error log:
    Code:
    18:24 [Info] Explosion was compiled successfully in 187ms
    18:24 [Info] Unloaded plugin Explosion v0.1.0 by DJDiamonD
    18:24 [Info] Loaded plugin Explosion v0.1.0 by DJDiamonD
    18:24 [Error] Failed to call hook 'ExplosionCommand' on plugin 'Explosion v0.1.0' (NullReferenceException: Object reference not set to an instance of an object)
    18:24 [Debug]  at EffectManager.AccumEffect () [0x00000] in <filename unknown>:0
      at EffectManager.Explode (Vector3 position, Vector3 normal, Single strength) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Explosion.StartExplode (.PlayerSession player, Vector3 location, Vector3 rotation) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Explosion.ExplosionCommand (.PlayerSession player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Explosion.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0 
    This is code of my plugin:
    Code:
    using System.Collections.Generic;
    using Newtonsoft.Json;
    using UnityEngine;
    using System.Linq;
    using Oxide.Core;
    using System;namespace Oxide.Plugins
    {
        [Info("Explosion", "DJDiamonD", 0.1)]
        [Description("Makes explosion")]
       
        class Explosion : HurtworldPlugin
        {       
            [ChatCommand("explosion")]
            private void ExplosionCommand(PlayerSession player, string command, string[] args)
            {
                if (!player.IsAdmin)
                {
                    hurt.SendChatMessage(player, "No Permission");
                    return;
                }
                GameObject playerEntity = player.WorldPlayerEntity;
                Vector3 vec = playerEntity.transform.rotation.eulerAngles;
                StartExplode(player, playerEntity.transform.position, vec);
            }               void StartExplode(PlayerSession player, Vector3 location, Vector3 rotation)
            {
                EffectManager.Explode(location, rotation);
            }
           
        }
    }
     
  2. Code:
    EffectManager.Instance.Explode(location, rotation);
     
  3. Ohh.. New error:
    Code:
    19:51 [Error] Explosion.cs(31,36): error CS0176: Static member `EffectManager.Explode(UnityEngine.Vector3, UnityEngine.Vector3, float)' cannot be accessed with an instance reference, qualify it with a type name instead
     
  4. Umm, I don't know much about Instances, but try it out:
    Code:
    Singleton<EffectManager>.Instance.Explode(location, rotation);
     
  5. Some error guy(
     
  6. Code:
    Singleton<EffectManagerServer>.Instance.RPC("RPCExplode", uLink.RPCMode.Others, (object) location, (object) rotation);
     
  7. Thanks man, but this is effect. Do you know how i can make big explosion with damage? For example how C4 or dynamite.
     
  8. Look at NukeWipe maybe :p
     
  9. But NukeWipe isn't for Rust? I need for Hurtworld or the same function?
     
  10. Oh sorry. Missed that.
     
  11. It's possible or no in Hurtworld?
     
  12. Have a look at the Explode() class in ExplosiveDynamicObjectServer
     
  13. Okey. But how can i do this Explode in place where i need. It doesn't have any arguments.
    [DOUBLEPOST=1457863993][/DOUBLEPOST]
    base.transform.position
    Where can i this change?
     
  14. It's a static function, don't use instance.
     
  15. I solved this problem. Now i need to make an Explode. How can i change base.transform.position in Explode() in ExplosiveDynamicObjectServer?
     
  16. Guys, how can i call the explosion effect with damage, sound.. How dynamite explosion. Any ideas?
    [DOUBLEPOST=1458581013][/DOUBLEPOST]I really know that dynamite explosion is Explode() void method in ExplosiveDynamicObjectServer, but i don't know how can i call this method. Any ideas guys?
     
  17. As it seems the ThreadStarter solved his first Problem.

    Can someone or youself (DJDiamonD) explain which is the correct Command?

    Because anything i'll get when i try stuff with the Explode-Method are Error in the InGame-Console:

    Code:
    attempting to use an uninitialised pool! GenericExplosion hurtworld
    Any help?
     
  18. This is how I do to create an explosion:

    - The explosion will use the landcrab mine configuration for radius, damage, etc...
    Code:
    public static ExplosionConfiguration landcrabXplosConfig;
    
    - On Plugin Init():
    Code:
    landcrabXplosConfig = (from o in Resources.FindObjectsOfTypeAll<ExplosiveDynamicServer>() where o.transform.name.Equals("LandCrabDynamicObject") select o).First().Configuration;
    
    - Explosion Method:
    Code:
    private void Explosion(Vector3 pos)
    {
        GameObject ExplosionServer = Singleton<NetworkManager>.Instance.NetInstantiate("ExplosionServer", pos, Quaternion.identity, GameManager.GetSceneTime());
        IExplosion componentByInterface = ExplosionServer.GetComponentByInterface<IExplosion>();
        componentByInterface.SetData(landcrabXplosConfig);
        componentByInterface.Explode();
    }
    
     
  19. Thanks for helping :)

    But does anyone know why the standard Explode-Class didnt work?
     
  20. You were instantiating the client version of the explosion, which the server isn't prepared to do, thus "attempting to use an uninitialised pool!"