• Print

Author Topic: TempAdd (v2.4) - Add a user to another group for a set amount of time  (Read 167090 times)

0 Members and 1 Guest are viewing this topic.

Offline TheChris812

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Bug with custom groups
« Reply #135 on: August 08, 2017, 08:00:58 am »
I have a bug where I can't tempadd someone to a group that I made myself for example VIP. This is what I get:

[ERROR] addons/ulx_tempadduser/lua/ulx/modules/sh/ulxtempuser.lua:166: Group does not exist for adding user to (vip)
  1. tempfuncadd - [C]:-1
   2. addUser - addons/ulx-v3_73/lua/ulx/xgui/server/sv_groups.lua:47
    3. call - addons/ulx_tempadduser/lua/ulx/modules/sh/ulxtempuser.lua:166
     4. __fn - addons/ulib-v2_63/lua/ulib/shared/commands.lua:943
      5. execute - addons/ulib-v2_63/lua/ulib/shared/commands.lua:1323
       6. unknown - addons/ulib-v2_63/lua/ulib/shared/commands.lua:1351
        7. Run - lua/includes/modules/concommand.lua:54
         8. unknown - addons/ulib-v2_63/lua/ulib/shared/commands.lua:1365
          9. unknown - lua/includes/modules/concommand.lua:54

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #136 on: August 08, 2017, 08:20:00 am »
Make sure your groups are all lower case.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #137 on: August 09, 2017, 12:04:40 pm »
Code: Lua
  1. function ulx.PeriodicExpirationCheck()
  2.  
  3.         if CLIENT then return end
  4.  
  5.         for _, pl in pairs (player.GetAll()) do
  6.                 if not IsValid(pl) then continue end
  7.                 if pl:IsConnected() then
  8.                         ulx.CheckExpiration( pl )
  9.                 end
  10.         end
  11.        
  12. end
  13. timer.Create( "ulx_periodicexpirationcheck", 3600, 0, ulx.PeriodicExpirationCheck )

I saw a link to this post and I was looking through the code and your updates on here and found that you said that code above checks every player every 30 minutes. I'd just like to point out that 3,600 seconds is 1 hour. There are 1800 seconds in 30 minutes :). Not a breaking change or anything, I think it's just me :P
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Phosphene

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #138 on: September 29, 2017, 04:18:22 pm »
Will it keep track of the time over server restarts etc? Thanks.

  • Print