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

0 Members and 3 Guests are viewing this topic.

Offline sodak

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #105 on: February 17, 2015, 05:32:35 AM »
I want also the feature that the script stores the group before and after the time the user will getting back to his before group. for admins would it cool... cuz after the amount of time my donate users get to the "stammspieler" group its not user its higher than users...

Offline KraytosXG

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #106 on: February 21, 2015, 12:53:14 PM »
So it might just be me, but i dont get how to download this command, or can i just get the lua code for it so i can just add it to the command list?

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 #107 on: February 21, 2015, 02:49:22 PM »
So it might just be me, but i dont get how to download this command, or can i just get the lua code for it so i can just add it to the command list?

I'm assuming you registered to post this.
Now that you are registered and logged into the forums, return to the main post and you'll see the download link at the bottom of the first post.

Offline sodak

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #108 on: March 02, 2015, 03:37:23 PM »
did u will add this feature to get back in the last group automatically?

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #109 on: March 02, 2015, 04:00:26 PM »
did u will add this feature to get back in the last group automatically?

That's too much work, it's not that hard to make it so admins have to type in the second group in which the player will be placed in after his time is done.

Usage: ulx tempadduser <player> <Group to place user in temporarily> <Time (Minutes)> <Group to place user in after time expires> - Add a user to specified group for a specified time.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline nico64160

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #110 on: March 08, 2015, 06:49:29 PM »
Hi man , Fistly I want to say a big "Thanks You" ! for this addon , its the best for donation system =)

But im got a little problem :

When i try  : ulx tempadduser "Yvon Mourir" admin 10 user           that work very good

but when i try : ulx tempadduser "Yvon Mourir" V.I.P 1 user          that do nothing

There are no errors , don't undestand why that doesn't work :s

If you have an issue im listenning you  =)

Thanks in advance and sorry for my bad english

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #111 on: March 08, 2015, 09:06:28 PM »
Hi man , Fistly I want to say a big "Thanks You" ! for this addon , its the best for donation system =)

But im got a little problem :

When i try  : ulx tempadduser "Yvon Mourir" admin 10 user           that work very good

but when i try : ulx tempadduser "Yvon Mourir" V.I.P 1 user          that do nothing

There are no errors , don't undestand why that doesn't work :s

If you have an issue im listenning you  =)

Thanks in advance and sorry for my bad english

Alright, assuming that you don't understand English entirely well, you may have an issue understanding what I'm going to say.

Is V.I.P. your group or team? If you do not know, please say now.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline nico64160

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #112 on: March 09, 2015, 04:58:53 AM »
Hi man  and thanks for your answer ,

V.I.P is the name of the group on ulx , if i do ulx adduser yvon V.I.P that work

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #113 on: March 09, 2015, 12:04:03 PM »
Hi man  and thanks for your answer ,

V.I.P is the name of the group on ulx , if i do ulx adduser yvon V.I.P that work

Alright, well then it sounds like a module error with this addon, so Mr. President will have to handle this.

Though before I give up on you yet, I'll say one last thing; are you sure your group is not V.I.P. and not V.I.P?
So what I'm telling you is try this:
ulx tempadduser Yvon V.I.P. 1 user

You could also try this if that doesn't work.

ulx tempadduser Yvon "V.I.P." 1 user
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline nico64160

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #114 on: March 10, 2015, 05:44:07 AM »
Hi man , this is my console :

] ulx tempadduser Yvon "V.I.P." 1 user
Command "ulx tempadduser", argument #2: invalid group "V.I.P." specified
] ulx tempadduser Yvon "V.I.P" 1 user
] ulx tempadduser Yvon "V.I.P" 1 user


I rename V.I.P to vip and that work , so i think it's maybe the MAJ or the . they don't work
« Last Edit: March 10, 2015, 06:43:40 AM by nico64160 »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #115 on: March 10, 2015, 11:49:33 AM »
You put a period (.) after your tempadd "P" = P.
Your addgroup "V.I.P" has no period after P
Seems Tempadd is working fine, you apparently just have no group named "V.I.P.", only "V.I.P" (no period)
Case sensitivity and Syntax is everything in lua.

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline nico64160

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #116 on: March 10, 2015, 01:32:05 PM »
Ok , so after testing :

vip , v.i.p and v.i.p. worked fine

and

VIP , V.I.P and V.I.P. don't work so MAJ are not working 

But the other work great so i use vip classic :o


I'm got a other little probleme , i'm got a donation system (gmdonate) and i want to integrate the ulx addtempuserid , the original code is :

ULib.ucl.addUser( User:SteamID(), allows, denies, ( ActionData[ 1 ] or "" ) );

and i test remplacing by :

ulx.tempadduserid( User:SteamID(), ( ActionData[ 1 ] or "" ), 1235, ( ActionData[ 1 ] or "" ) );   (no error but dont work)

and

ULib.ucl.tempadduserid( User:SteamID(), ( ActionData[ 1 ] or "" ), 1235, ( ActionData[ 1 ] or "" ) );   (gmdonate/actions/ulx_usergroup.lua:7: attempt to call field 'tempadduserid' (a nil value) )


If you have an issue that will help me a lot =)
« Last Edit: March 10, 2015, 02:35:16 PM by nico64160 »

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 #117 on: March 10, 2015, 09:25:02 PM »
Without looking at my code, I wouldn't know... but I may have it run the input through a string.Lower since best practice dictates that group names should be lowercase anyway.
That would account for v.i.p working but V.I.P not.

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 #118 on: March 10, 2015, 09:27:20 PM »
Update: That's what I did. For this to work properly, you'll need team names that are all lowercase.

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #119 on: March 12, 2015, 04:14:51 PM »
I get this error when i use the !menu version AND the console command:

(put in lua context because it looks cooler!)
Code: [Select]
Lua Error: [ERROR] addons/ulx_tempadduser/lua/ulx/modules/sh/ulxtempuser.lua:166: Group does not exist for adding user to (twitch donator)
 1. tempfuncadd - [C]:-1
 2. addUser - addons/ulx/lua/ulx/xgui/server/sv_groups.lua:48
 3. call - addons/ulx_tempadduser/lua/ulx/modules/sh/ulxtempuser.lua:166
 4. __fn - addons/ulib/lua/ulib/shared/commands.lua:943
 5. unknown - addons/ulib/lua/ulib/shared/commands.lua:1296
 6. Run - lua/includes/modules/concommand.lua:54
 7. unknown - addons/ulib/lua/ulib/shared/commands.lua:1310
 8. unknown - lua/includes/modules/concommand.lua:54

EDIT-JAMMINR-Feel free to put it in code block, but not Lua, and use carriage returns instead of all one line.
« Last Edit: March 12, 2015, 09:40:02 PM by JamminR »