ULX

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

0 Members and 2 Guests are viewing this topic.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #75 on: November 14, 2013, 10:07:05 PM »
Were you able to replicate this? Are you sure you didn't put in 10 minutes by accident? What value did you put in for the time value?

Offline nofear1999

  • Newbie
  • *
  • Posts: 30
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #76 on: November 15, 2013, 09:52:32 PM »
I just tried to add someone else to operator for 3 hours (180 minute)
scroller would only let me go up to 100, so I typed in the text box "180" and it defaulted to 100.

Offline nofear1999

  • Newbie
  • *
  • Posts: 30
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #77 on: November 15, 2013, 09:55:38 PM »
This error only occurs with the XGUI menu. Console commands work fine (: I'll stick with console then.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #78 on: November 16, 2013, 09:14:09 AM »
Oh, yeah.. I'm not sure how XGUI works. Just stick with console commands. :)

Offline Irata

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #79 on: November 16, 2013, 12:49:54 PM »
i tryed to use the function in my automated donation system.
But i also had problems that players only get the donation rank for a few minutes.

i try to call it like this
Code: [Select]
ulx.tempadduser(ply, ply, "donator", 87660, "user")
im not the best with lua, hope you guys can help me.
Also thanks for that awesome plugin!

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #80 on: November 16, 2013, 06:08:42 PM »
What you posted should make someone a donator for 60.8 days. And then return them to user after it's over.

Offline Irata

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #81 on: November 17, 2013, 11:20:44 AM »
Yes, but after +- 5 minutes they get set back to group user... what shouldnt happen

Offline Suspect2161

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #82 on: February 07, 2014, 09:19:09 PM »
How do we see how much time left the user has, can you maybe make a ulx command or menu to check?

Offline pants

  • Newbie
  • *
  • Posts: 33
  • Karma: 4
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #83 on: February 26, 2014, 09:28:56 PM »
Would it be possible to make the data save so that it works with this? (I can provide the file to mr.president, or whoever can help me get it working)

http://coderhire.com/scripts/view/894

edit: will tip anyone who could make it work
« Last Edit: February 26, 2014, 09:30:54 PM by pants »

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #84 on: February 26, 2014, 11:41:54 PM »
What is that? Code hire won't load for me from here.

Offline fopje

  • Newbie
  • *
  • Posts: 10
  • Karma: 2
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #85 on: February 27, 2014, 01:05:35 AM »
It's a module to save ulx data into a mysql database instead of txt files

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #86 on: February 27, 2014, 05:56:35 AM »
I might be wrong, but it should just work with that add-on. Have you tried it yet?

Offline fopje

  • Newbie
  • *
  • Posts: 10
  • Karma: 2
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #87 on: February 27, 2014, 06:00:57 AM »
 I think you understand him wrong.

At the moment tempadduser makes a txt file in the data/ulx/tempadduser with their steamid64. If I understand him correctly he wants it to be able that the data get's saved in mysql instead of in that folder.

Offline pants

  • Newbie
  • *
  • Posts: 33
  • Karma: 4
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #88 on: February 27, 2014, 10:44:00 AM »
kinda @fop
Coderhire was down last night.
I don't know how the data from this saves, but usually the mysql addon can read everything in users.txt and groups.txt but this one causes it to break for some reason (I think because in users.txt it doesn't give an actual rank)

Offline fopje

  • Newbie
  • *
  • Posts: 10
  • Karma: 2
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #89 on: February 27, 2014, 02:36:47 PM »
kinda @fop
Coderhire was down last night.
I don't know how the data from this saves, but usually the mysql addon can read everything in users.txt and groups.txt but this one causes it to break for some reason (I think because in users.txt it doesn't give an actual rank)

When you add someone to another group with tempadduser it will be saved into user.txt yes (so with the addon in the database)
the file in the data folder is only used by tempadduser to check when they have to be set back to the previous group. It's not for group saving itself.