Godmode

Moved

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

4.76667/5, 60 likes
  1. God mode not working for me with your fix!
     
  2. Are you flagged as owner or moderator with the ownerid or moderatorid command?
     
  3. Admin commands are not working in Oxide some reason. There's something breaking it. Might be a plugin. Whenever I use an Admin command, it tells me I do not have permissions. Slowly installing plugin 1 by 1 starting now, to see which one is breaking the Admin on the server. That may be what he is experiencing.
     
  4. I am owner authority lvl2 ownerid
    [DOUBLEPOST=1416693555][/DOUBLEPOST]this is the error I get from RCON when I use the god command
    [Oxide] 4:58 PM [Error] m-Godmode: [string "m-Godmode.lua"]:110: attempt to compare number with boolean
    at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
    at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0
    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
     
  5. Same by me ....
     
  6. hi there i still cant seem to go godmode i removed old plugin updated to this version reset server when i type /god nothing i can do alot of other commands like /give /find there all working fine but this one still isnt putting me in godmode since the update
     
  7. Same here /god still doing nothing. Don't mean to sound like I'm complaining in all these threads, I know you guys are working hard on these and I appreciate everything you do 100%. Just want to give you any info I can to help.
     
  8. Mughisi updated Godmode with a new update entry:

    Bug fix, helptext support & updater support.

     
  9. works perfect now thank you
     
  10. Yes, working perfect now. tyvm
     
  11. Yes its working great now Thanks!!! You Da Man!!!
     
  12. with love:
    Code:
    function PLUGIN:OnPlayerLoot( sourceplayerloot, target )
       -- Check if the sourcePlayer is trying to loot a player (and not an item like a wood storage box)
        if(target:GetComponent("BasePlayer")) then
            -- Trying to loot a player
            local sourcePlayer = sourceplayerloot:GetComponent("BasePlayer")
            local targetPlayer = target:GetComponent("BasePlayer")
            -- Check if player is trying to loot an admin
            if( targetPlayer:GetComponent("BaseNetworkable").net.connection.authLevel >= 1 ) then
                -- If trying to loot an admin, close the loot
                sourceplayerloot:Clear()
                rust.SendChatMessage( sourcePlayer , "SERVER", "You may not loot an admin" )
               if(targetPlayer:IsConnected()) then
                  rust.SendChatMessage( targetPlayer , "SERVER", sourcePlayer.displayName .. " tried to loot you" )
               end
            end
        end
    end
     
  13. Shouldn't be required as the last update normally disabled looting players. :p
     
  14. ha --' need to test if it works for sleepers :p
     
  15. hi there can you please update this one to work so we cant get killed when we sleep
     
  16. [Oxide] 2:42 PM [Info] [Logger] GooberGrape ran chat command: /help
    [Oxide] 2:42 PM [Error] m-Godmode: A .NET exception occured in user-code
    [DOUBLEPOST=1418154246][/DOUBLEPOST]we added to it to give players a message when they do damage to you in godmode that you are a admin in godmode and also protects yyou while your asleep..
     
  17. Upperking, can you show us how please?
    [DOUBLEPOST=1418664475,1418625471][/DOUBLEPOST]I added the following to the

    function PLUGIN:OnEntityAttacked( entity, hitinfo )


    rust.BroadcastChat("God-Mode", "You are hitting an Admin in GOD mode! Stop it NOW!")

    But that sends this to the whole server, can I get the attacker info somehow here to send it just to them?

    Thanks.
     
  18. you just wrote:
    'when ANY entity (animal or human) gets attacked' => You are hitting an Admin in GOD mode! Stop it NOW!"
     
  19. Hi Reneb,

    Not exactly true as there are two checks in this function, see below: (in RED below is what I have added)

    function PLUGIN:OnEntityAttacked( entity, hitinfo )

    -- Check if a player is taking the damage.
    if entity:ToPlayer() then
    -- Grab the Steam ID of the player.
    local userID = rust.UserIDFromPlayer(entity)

    -- Check if the player has Godmode enabled.
    if Gods[userID] then
    -- The player has Godmode enabled, set the damage dealt to 0.
    hitinfo.damageAmount = 0

    -- Send the message the system
    rust.BroadcastChat("God-Mode", "You are hitting an Admin in GOD mode! Stop it NOW!")


    -- Check if the hitindicator should be shown or not.
    if not self.Config.Settings.ShowHitIndicator then
    return true
    end
    end
    end
    end


    I'm guessing there has to be a way to find out from hitinfo, WHO hit me, but don't know how yet.

    Is there a book or API page with all the objects and it's methods that I can look up? (I'm a lua scripting NOOB)

    Thanks,
    TheDoc
     
  20. hitinfo.damageAmount = 0 => no need on experimental, just return false to cancel the damage
    what you need then is:
    Code:
    if (entity.Initiator and entity.Initiator:ToPlayer()) then
      rust.SendChatMessage(entity.Initiator:ToPlayer(),"God-Mode", "You are hitting an Admin in GOD mode! Stop it NOW!")
    end
    return false