Godmode

Moved

Total Downloads: 30,059 - First Release: Oct 23, 2014 - Last Update: Oct 27, 2017

4.76667/5, 60 likes
  1. I just found the Timed Permissions plugin from LaserHydra that would solve my issue!
     
  2. I have a error when I type /god Player, even removing the god of the player, still immortal, how can I fix it?
     
  3. @Wulf
    defaultInformAttacker not works. No messages are typed anymore.

    Damages disabled when god is enabled not works too.
     
  4. I beleive it's refering to this in the code:

    Godmode.cs
    Code:
    void OnPlayerLoot(PlayerLoot lootInventory, UnityEngine.Object targetObject)
            {
                var player = lootInventory.GetComponent<BasePlayer>();
                var target = targetObject as BasePlayer;
                if (!target) return;
                if (gods[target.userID] != null)
                    NextTick(() =>
                    {
                        player.EndLooting();
                        SendChatMessage(player, noGodLoot);
                    });
            }
    I beleive the hook OnPlayerLoot was replaced with a different name, we just need to know what that name is and correct it in the code, any devs could answer that?
    Thanks.
     
    Last edited by a moderator: Feb 24, 2016
  5. I'm not dev too but probably something in this list

    Gmod.jpg
     
  6. Wulf

    Wulf Community Admin

    That is from Rust, the hook is from Oxide.

     
  7. Thanks I'll correct that value on my sever and post back changed lines.

    Changed line 244 on Godmode.cs

    From:
    void OnPlayerLoot(PlayerLoot lootInventory, UnityEngine.Object targetObject)

    To:
    void OnLootPlayer(BasePlayer lootInventory, UnityEngine.Object targetObject)

    No errors up to now.
     
    Last edited by a moderator: Feb 24, 2016
  8. Thanks @[NRNS]Ynot!

    Still getting the permission prefix Warning though:
     
  9. Yes looking at permissions myself at the moment too, doing some digging will post any findings.
     
  10. Wulf

    Wulf Community Admin

    Change lootInventory to player, and remove var player = lootInventory.GetComponent<BasePlayer>(); as well. The 2nd arg is BasePlayer as well, which you'd set to target and can then remove the line var target = targetObject as BasePlayer; too. Unnecessary converting and casting if not. ;)
     
  11. Well seen thanks will do.
     
  12. Wulf

    Wulf Community Admin

    I'd change it to "godmode.allowed" as that makes more sense to me.
     
  13. hmm not 100% sure this is what you meant, new to the plugins started a server 2 days ago, here's what I did:
    Code:
    void OnLootPlayer(BasePlayer player, UnityEngine.Object targetObject)
            {
                if (!BasePlayer) return;
                if (gods[BasePlayer.userID] != null)
                    NextTick(() =>
                    {
                        player.EndLooting();
                        SendChatMessage(player, noGodLoot);
                    });
            }
    Above does not work...
    This works for me:
    Code:
    void OnLootPlayer(BasePlayer player, UnityEngine.Object targetObject)
            {
                var target = targetObject as BasePlayer;
                if (!target) return;
                if (gods[target.userID] != null)
                    NextTick(() =>
                    {
                        player.EndLooting();
                        SendChatMessage(player, noGodLoot);
                    });
            }
    [DOUBLEPOST=1456280547][/DOUBLEPOST]
    ohh I see instead of canusegodmode ??

    changed all occurences of, canusegodmode to godmode.allowed, in file Godmode.cs no more warnings on permissions.

    Just make sure when giving permissions to use godmode.allowed instead
     
    Last edited by a moderator: Feb 24, 2016
  14. Wulf

    Wulf Community Admin

    You're not handling it right, and you're trying to check things that do not exist. ;)
     

    Attached Files:

  15. Ohh I see lol my coding is RUSTy haven't coded for a long time !!
    Thanks for the updated version !!
    I did also updated other plugins the same way and they are working.
     
  16. any ideas why when i disable it i take no damage, i bleed but no damage
     
  17. its saying i don't have the perms to use where do i add it so i can use it
     
  18. Wulf

    Wulf Community Admin

    The permission needed is listed on the Overview. You can find the tutorial here: Using Oxide's permission system | Oxide. All you need is the grant command.
     
  19. This is what i typed in the console
    grant group owner god
    and
    grant user owner /god
    neither of these worked
    [DOUBLEPOST=1456673762][/DOUBLEPOST]would you be able to send me a list of perms that i cant try add