Ulysses

Ulysses Stuff => Releases => Topic started by: Bite That Apple on November 30, 2013, 02:42:59 AM

Title: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on November 30, 2013, 02:42:59 AM
Autopromote XGUI Version

This plugin is better for those big servers with ton of groups. This is basically any regular autopromote, but this one involves xgui, and allows you to change things while in game. This requires utime, and this also goes well with my other plugin; Utime Hour Changer (http://forums.ulyssesmod.net/index.php/topic,6182) , so you can test if it works for you :p
I should of uploaded this like six months ago, so yeah... better late then never. This was originally made by one of my friends named "Lead4U", but he abandoned the project, and it stopped working after some time, so I came back and fixed it now. This is my second to last project for this year, my last project is going to be my super project that a lot of you guys have been waiting for. :)

Please Keep Note:
If you like this addon, I would really appreciate a "Compliment" Karma which is located next to my name. That's how I know you care :)
You must be registered and logged in the ulx forum to see the download link which is found under the preview image


Requirements:
Ulx 3.50+
ULib 2.50+
Current version of Utime

HOW TO USE:
You'll need superadmin (unless you have a rank that inherits from superadmin w/e), and go to Settings > APromote. Make sure it's enabled, and then you can start adding your hours to the ranks and such.
Hour -1 means it's disabled and that group will be ignored completely.
Play Sound is when someone gets promoted, it will play a small sound to that player.
Global Sound will play that sound to everyone.
Confetti will just make an effect around the promoted player, and will go away after 5 seconds.
Auto Demote is dangerous if you haven't set all your usergroups hours yet. I suggest before setting this to yes is you set all your usergroups hours first, then turn that on if you want to. It's not required to be on. What auto demote does is if you are part of a usergroup's hours that are higher than the hours you actually have, it willl demote you to the next usergroup below your current usergroup (unless that usergroup is above group user, as it can not be demoted back down.)


FEATURES:


KNOWN BUGS:
Maybe being dumb you can cause problems.


Preview:
(http://i.imgur.com/hNgyCsO.png?1)


DOWNLOAD LINK BELOW
You must be registered and logged in the ulx forum to see the download link which is found under the preview image
Title: Re: Autopromote XGUI Version
Post by: Megiddo on November 30, 2013, 07:55:48 AM
Nice simple configuration, chaos. What does auto demote do?

Also, this is apparently my 5300th post. I feel old.
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on November 30, 2013, 10:33:23 AM
Nice simple configuration, chaos. What does auto demote do?

Also, this is apparently my 5300th post. I feel old.


I should better explain myself in the original post.

(This would either happen if you have deleted the sv.db (for w/e odd reasons) or utime has suddenly stopped working, or your using my addon to lower players time)
So say you have all groups set and you(as a player) have 50 hours:
operator - 5 hours
admin - 10 hours
superadmin - 50 hours

So you assume you will be promoted to superadmin, and that is correct.. Now, let's say somehow your time got (re)set to 49 somehow, well the script would automatically demote you back to admin usergroup.
Title: Re: Autopromote XGUI Version
Post by: Bytewave on November 30, 2013, 03:10:26 PM
I'm going to assume if you are a higher rank in an inheritance tree than what is set as your promotion ranks, you won't be demoted back to the lower rank when you meet the required time. Is this correct?
Also, would turning on Auto Demote affect this?



First post! Hello, world of Ulysses! :D
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on November 30, 2013, 06:03:48 PM
I'm going to assume if you are a higher rank in an inheritance tree than what is set as your promotion ranks, you won't be demoted back to the lower rank when you meet the required time. Is this correct?
Also, would turning on Auto Demote affect this?



First post! Hello, world of Ulysses! :D

I'm not sure if I can take that username serious but I will attempt to.

As long as you make the high ranks excluded (-1 hours) you will not be demoted back down (if you even have auto demote on anyways). I really don't suggest even having Auto Demote on as it's not really needed, and if you or anyone doesn't understand it, it's best to just leave it off.
Title: Re: Autopromote XGUI Version
Post by: JamminR on December 02, 2013, 07:21:52 PM
Off-topic split (http://forums.ulyssesmod.net/index.php/topic,6798.0.html)
Never start a new release thread just to get back on topic.
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on December 02, 2013, 08:32:40 PM
Off-topic split (http://forums.ulyssesmod.net/index.php/topic,6798.0.html)
Never start a new release thread just to get back on topic.

That works to.
Title: Make APromote work with Inheritance disabled
Post by: HazCP on February 01, 2014, 02:15:53 PM
Hi there,

So, essentially what it says in the title: can Apromote work with inheritance disabled?

Thanks
Haz
Title: Re: Make APromote work with Inheritance disabled
Post by: Bite That Apple on February 01, 2014, 05:36:55 PM
Hi there,

So, essentially what it says in the title: can Apromote work with inheritance disabled?

Thanks
Haz

Yes it can, or it should. I think I tested it while I had inheritance was off, as I usually don't set it up correctly on my test servers.
Title: Re: Autopromote XGUI Version
Post by: HazCP on February 02, 2014, 05:29:30 AM
I'm not sure if it does. So I've got my regular rank at 20 hours. uTime on one of my player is 21 hours  and yet no promotion. He's a member rank, which can only be acquired by joining our forums.. Is that the problem?
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on February 02, 2014, 01:56:14 PM
I'm not sure if it does. So I've got my regular rank at 20 hours. uTime on one of my player is 21 hours  and yet no promotion. He's a member rank, which can only be acquired by joining our forums.. Is that the problem?

No, it shouldn't be a problem. This might be a stupid question, but I want to ask it anyways for reinsurance.

On the left side buttons in this picture, those are all the settings that are on be default (which personally I think should be left like that). I'd make sure that you have enabled on, because if it's off than that is your issue... Please tell me if that wasn't your issue, because than I'll get on my garrysmod sever without inheritances and test it.
Title: Re: Autopromote XGUI Version
Post by: d162740 on February 04, 2014, 04:17:30 AM
No, it shouldn't be a problem. This might be a stupid question, but I want to ask it anyways for reinsurance.

On the left side buttons in this picture, those are all the settings that are on be default (which personally I think should be left like that). I'd make sure that you have enabled on, because if it's off than that is your issue... Please tell me if that wasn't your issue, because than I'll get on my garrysmod sever without inheritances and test it.

I got same problem too. After i installed the addon , it works . It promoted all my online user who played over 30 hours. But now (2 weeks after) , some player told my that he played over 1 days and got nothing. I want to know when would the system check the played time of the player and promote them.
Title: Re: Autopromote XGUI Version
Post by: Neku on February 04, 2014, 08:05:53 AM
1 day is not 30 hours...
Title: Re: Autopromote XGUI Version
Post by: d162740 on February 04, 2014, 08:36:08 AM
1 day is not 30 hours...

Sorry , my fault . I want to say 1 day 6 hours .
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on February 04, 2014, 03:41:04 PM
Sorry , my fault . I want to say 1 day 6 hours .

Please provide this for me, and I'll get back to you ASAP:
[1] The players name who is not being promoted (exactly how it's spelled with uppercase {just copy and past please}):
[2] Players STEAMID(I hope you know how to get that):
[3] Your server IP(I'll join it and see what's going on {and no I do not need any more of admin/mod, nor will I ask for it}):

Title: Re: Autopromote XGUI Version
Post by: HazCP on February 09, 2014, 03:53:24 PM
Aah, I think I know what's wrong. I have the CH script: Steam Group Rewards where when one joins the group, they gain "member" rank.

So, is there anyway to make it so that, you have to have member to rank up?

Cheers,
Haz
Title: Re: Autopromote XGUI Version
Post by: Scarvest12 on April 25, 2014, 09:47:28 AM
Is it possible to send a global message to everyone when someone is promoted?
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on May 04, 2014, 06:41:01 PM
I'm pretty sure that it already does this..
Title: Re: Autopromote XGUI Version
Post by: Neku on May 14, 2014, 07:15:42 PM
As long as you make the high ranks excluded (-1 hours) you will not be demoted back down (if you even have auto demote on anyways). I really don't suggest even having Auto Demote on as it's not really needed, and if you or anyone doesn't understand it, it's best to just leave it off.
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on May 16, 2014, 01:43:34 AM


(http://4.bp.blogspot.com/_woQNKXqK1qg/SpZOAXJqEeI/AAAAAAAAAUo/RyUyOdosCBw/s400/nixon.jpg)

No comment, but only this.
Title: Re: Autopromote XGUI Version
Post by: Neku on May 16, 2014, 07:47:34 AM
Missing quote? XD
Title: Re: Autopromote XGUI Version
Post by: Decicus on May 16, 2014, 09:41:44 AM
Missing quote? XD
He quoted your post, but it only contained his quote. Basically, quotes that contain a quote won't show the quote.
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on May 16, 2014, 05:10:18 PM
Missing quote? XD

Nixon approves people who read the main post, before asking questions! God bless 'Merica.
Title: Re: Autopromote XGUI Version
Post by: Exile on June 05, 2014, 06:55:38 PM
Lets say someone is VIP, and that you need 5 hours for mini-vip, would they get moved to that rank or stay in VIP, also VIP is same thing as user on my server. Please HELP!
Title: Re: Autopromote XGUI Version
Post by: Neku on June 05, 2014, 09:03:37 PM
Lets say someone is VIP, and that you need 5 hours for mini-vip, would they get moved to that rank or stay in VIP, also VIP is same thing as user on my server. Please HELP!

Is VIP a time-based rank?
Title: Re: Autopromote XGUI Version
Post by: Valgoid on June 11, 2014, 09:09:59 AM
Lets say it isnt? Im curious what would happen?
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on June 17, 2014, 07:26:23 AM
Lets say it isnt? Im curious what would happen?

If you set the VIP rank/group to -1, nothing will happen to it, because it's excluded.
Title: Re: Autopromote XGUI Version
Post by: nar308 on August 07, 2014, 10:07:13 PM
ok so how do i target which group will be promoted. Like it works with users, but how can i get it to work with members so that when they play 10 hours they get promoted to regular. Because it works perfectly fine with users to regular, but what about members to regular?
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on August 11, 2014, 09:30:26 PM
ok so how do i target which group will be promoted. Like it works with users, but how can i get it to work with members so that when they play 10 hours they get promoted to regular. Because it works perfectly fine with users to regular, but what about members to regular?

Basically, if you have a usergroup set to excluded(-1), then that user will never be removed or set to that usergroup. So let's say that a new user joins the server as "New Player" which is the usergroup "User" (you can't see the usergroup User, as it's default, and everyone in the usergroup "User", will always be moved to the next following group), then in five hours after playing, they get moved to a usergroup called "Regular" because you set it at 5.
Title: Re: Autopromote XGUI Version
Post by: Mesosade on August 14, 2014, 01:59:14 AM
So I put this in my addons folder but for some reason my superadmin can't see settings for autopromote in xgui, it doesn't even appear to be loaded by xgui in the console logs. But the actual addon itself is loaded by the server.

"Adding Filesystem Addon '/home/mesosade/Steam/steamapps/common/GarrysModDS/garrysmod/addons/ulx auto promote"

///////////////////////////////
//       ULX Admin Mod       //
///////////////////////////////
// Loading...                //
//  sh_defines.lua           //
//  lib.lua                  //
//  base.lua                 //
//  sh_base.lua              //
//  log.lua                  //
//  MODULE: slots.lua        //
//  MODULE: uteam.lua        //
//  MODULE: votemap.lua      //
//  MODULE: xgui_server.lua  //
///////////////////////////////
// ULX GUI -- by Stickly Man //
///////////////////////////////
// Adding Main Modules..     //
//  bans.lua                 //
//  commands.lua             //
//  groups.lua               //
//  maps.lua                 //
//  settings.lua             //
// Adding Setting Modules..  //
//  client.lua               //
//  server.lua               //
// Adding Gamemode Modules.. //
//  sandbox.lua              //
// Loading Server Modules..  //
//  sv_bans.lua              //
//  sv_groups.lua            //
//  sv_maps.lua              //
//  sv_sandbox.lua           //
//  sv_settings.lua          //
// XGUI modules added!       //
///////////////////////////////
//  MODULE: chat.lua         //
//  MODULE: fun.lua          //
//  MODULE: menus.lua        //
//  MODULE: rcon.lua         //
//  MODULE: teleport.lua     //
//  MODULE: user.lua         //
//  MODULE: userhelp.lua     //
//  MODULE: util.lua         //
//  MODULE: vote.lua         //
//  end.lua                  //
// Load Complete!            //
///////////////////////////////

But no sign of it here. :(
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on August 16, 2014, 03:36:27 AM
three questions:
[1] is that linux?
[2] are you sure you added it correctly (unziped, and is not like addons/ulx Auto Promote/ulx Auto Promote)
[3] did you alter any files? (delete/change, edit)
Title: Re: Re: Autopromote XGUI Version
Post by: unknown1138 on September 06, 2014, 12:02:35 PM
Same problem here, it doesn't load for some reason.

I'm running my server on Ubunutu 14.04LTS and didn't change anything.
Title: Re: Autopromote XGUI Version
Post by: starman12355 on September 07, 2014, 05:00:15 PM
I added extracted it then added it then add UTime then I restarted.
I got this error:
[ERROR] lua/includes/extensions/table.lua:51: bad argument #1 to 'pairs' (table expected, got nil)
  1. pairs - [C]:-1
   2. Empty - lua/includes/extensions/table.lua:51
    3. fn - addons/ulx/lua/ulx/modules/cl/xgui_client.lua:428
     4. func - addons/ulib/lua/ulib/client/cl_util.lua:22
      5. unknown - lua/includes/modules/net.lua:32

Also, it's not showing up under settings     
Title: Re: Re: Autopromote XGUI Version
Post by: Bytewave on November 11, 2014, 06:07:45 PM
So I put this in my addons folder but for some reason my superadmin can't see settings for autopromote in xgui, it doesn't even appear to be loaded by xgui in the console logs. But the actual addon itself is loaded by the server.

"Adding Filesystem Addon '/home/mesosade/Steam/steamapps/common/GarrysModDS/garrysmod/addons/ulx auto promote"

///////////////////////////////
//       ULX Admin Mod       //
///////////////////////////////
// Loading...                //
//  sh_defines.lua           //
//  lib.lua                  //
//  base.lua                 //
//  sh_base.lua              //
//  log.lua                  //
//  MODULE: slots.lua        //
//  MODULE: uteam.lua        //
//  MODULE: votemap.lua      //
//  MODULE: xgui_server.lua  //
///////////////////////////////
// ULX GUI -- by Stickly Man //
///////////////////////////////
// Adding Main Modules..     //
//  bans.lua                 //
//  commands.lua             //
//  groups.lua               //
//  maps.lua                 //
//  settings.lua             //
// Adding Setting Modules..  //
//  client.lua               //
//  server.lua               //
// Adding Gamemode Modules.. //
//  sandbox.lua              //
// Loading Server Modules..  //
//  sv_bans.lua              //
//  sv_groups.lua            //
//  sv_maps.lua              //
//  sv_sandbox.lua           //
//  sv_settings.lua          //
// XGUI modules added!       //
///////////////////////////////
//  MODULE: chat.lua         //
//  MODULE: fun.lua          //
//  MODULE: menus.lua        //
//  MODULE: rcon.lua         //
//  MODULE: teleport.lua     //
//  MODULE: user.lua         //
//  MODULE: userhelp.lua     //
//  MODULE: util.lua         //
//  MODULE: vote.lua         //
//  end.lua                  //
// Load Complete!            //
///////////////////////////////

But no sign of it here. :(
I heard Unix based Garry's Mod server and client installations don't play well with capital letters or spaces in addon folder names. Try removing those?

EDIT: And I'm the guy who usually preaches for reading the post date... Meh. I'll leave this here if anyone else needs help.
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on November 12, 2014, 07:01:26 PM
Updated All Plugins:
I updated all files/folder names to lowercase and underscores so that we won't have a problem with linux based server.

Special Thanks to Princess Twilight Sparkle
Title: Re: Re: Autopromote XGUI Version
Post by: Bytewave on November 12, 2014, 08:23:49 PM
Updated All Plugins:
I updated all files/folder names to lowercase and underscores so that we won't have a problem with linux based server.

Special Thanks to Princess Twilight Sparkle
<3
Happy to share what I know.
Title: Re: Autopromote XGUI Version
Post by: DH1806 on January 16, 2015, 05:47:54 AM
--> http://forums.ulyssesmod.net/index.php/topic,8012.0.html (http://forums.ulyssesmod.net/index.php/topic,8012.0.html)
I found out that Autopromote is the reason the errors appear that I have described in the topic. A little summary of what happend:
-I've used Autopromote already for some weeks and only for one user group, 'Regular User' which will be set after 6 hours of playing time. Must have been 20-25 Users right now.
-I've changed nothing and was playing for my friends already for more than one hour when suddendly after a mapchange:
---All Ranks were deleted
---The Round wasn't starting (everyone was spectator)
---The errors from the thread above appeared.
-Server Restart didn't solve it.
-After deleting Auto Promote from the addons the server worked again.
-I've downloaded it again as I thought I might have had an older version and put it back on the server, but then the same things happend as I described already (only the superadmin rank from me wasn't deleted this time).

Any ideas what the problem could be or how to fix it? I would very much like to keep on using this addon. :(
Title: Re: Autopromote XGUI Version
Post by: JamminR on January 16, 2015, 10:28:04 AM
One more thing I forgot to suggest to you DH1806, make sure you have the latest ULib, ULX and UTime code from our github.
https://github.com/Nayruden/Ulysses - zip file at lower right. Though it contains MORE releases than just those three, only upload those three to your server for now.
Then try again.
Title: Re: Autopromote XGUI Version
Post by: DH1806 on January 16, 2015, 11:24:11 AM
Thanks for the tip, but it didn't help. :/
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on January 21, 2015, 12:33:19 AM
Thanks for the tip, but it didn't help. :/

Interesting, well, the only suggestion I can give you is delete the apromote file (data/ulx/apromote.txt) and try again, there must have been or be some file that conflicted with autopromote, or something did not execute correctly.

By any chance, do you have an special characters in your usergroups? Or anything in general that is NOT just normal text?

Secondly, do you have any other addons that use xgui/ulx/ulib for ANYTHING?
Title: Re: Autopromote XGUI Version
Post by: DH1806 on January 28, 2015, 04:56:44 AM
Sorry for that late reply.
Well, here are all my usergroups: superadmin, admin, operator, vip, stammuser, verystammuser, suchti

I use some addons where I think they should use xgui/ulx/ulib: Join/Disconnect Message, UTime, Chat Tags, AAFK

btw, I'm using the "normal" Autopromote atm and it works fine, so I think it could be xgui here.
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on February 03, 2015, 08:29:22 AM
Sorry for that late reply.
Well, here are all my usergroups: superadmin, admin, operator, vip, stammuser, verystammuser, suchti

I use some addons where I think they should use xgui/ulx/ulib: Join/Disconnect Message, UTime, Chat Tags, AAFK

btw, I'm using the "normal" Autopromote atm and it works fine, so I think it could be xgui here.

When you say you're using "xgui", that makes me a little worried. Like, did you actually "download" xgui? If so, I'd suggest to delete it, because XGUI has been integrated with ULX since maybe 2011. Most likely you did not do this, but if you did, delete, and delete ulx, redownload it from ulx website, and try again.

As to what autopromote you said you were using, what other autopromote are you talking about at this moment?


Lastly, thank you for supporting my addons, I'm very grateful for your support.
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on February 03, 2015, 11:23:09 PM
Updated addon to current system!
Title: Re: Autopromote XGUI Version
Post by: Luk | twitch.tv/doctorluk on February 04, 2015, 09:21:58 AM
May I ask what "current system" means? You've posted that - as it seems - into all threads of your plugins. Is it mandatory for us to update our plugins on the server? Did I miss something crucial?  ???
Title: Re: Autopromote XGUI Version
Post by: Bite That Apple on February 04, 2015, 09:51:15 AM
May I ask what "current system" means? You've posted that - as it seems - into all threads of your plugins. Is it mandatory for us to update our plugins on the server? Did I miss something crucial?  ???

No, you don't have to update. It's not critical update, it only added a version check now. So if the addon gets outdated, the server will then alert you that the addon is outdated, and will advice you to update every time the server starts. I did it to all my addons, as they're all connected somehow.
Title: Re: Autopromote XGUI Version [4.08v]
Post by: Ephox on April 06, 2015, 01:53:47 PM
So i added this addon to my server, i can get the settings up but whenever i try to change the number on one of the groups from -1 to 1 or something else it just reverts back to -1
Title: Re: Autopromote XGUI Version [4.08v]
Post by: Bite That Apple on April 06, 2015, 03:57:47 PM
So i added this addon to my server, i can get the settings up but whenever i try to change the number on one of the groups from -1 to 1 or something else it just reverts back to -1

Any errors on server console or your console?
Title: Re: Autopromote XGUI Version [4.08v]
Post by: Luk | twitch.tv/doctorluk on April 15, 2015, 12:47:22 PM
Hey Bite That Apple, I'm reporting a bug with a player here.

The player is named
Code: [Select]
Eustass "Captain" Kidand the ' " ' is breaking the plugin. The plugin prints the following upon trying to promote this player and ends up permanently promoting him every 10 seconds:

Code: [Select]
Command "ulx adduser", argument #1: No target found or target has immunity!
Title: Re: Autopromote XGUI Version [4.08v]
Post by: Aaron113 on April 15, 2015, 06:28:29 PM
My suggestion would be to change it to steamid or just bypass ulx entirely as MrPresident suggested. (http://forums.ulyssesmod.net/index.php/topic,8418.msg43044.html#msg43044)
Title: Re: Autopromote XGUI Version [4.08v]
Post by: Bite That Apple on April 15, 2015, 11:32:52 PM
My suggestion would be to change it to steamid or just bypass ulx entirely as MrPresident suggested. (http://forums.ulyssesmod.net/index.php/topic,8418.msg43044.html#msg43044)

Done

- - -

Hey Bite That Apple, I'm reporting a bug with a player here.

The player is named
Code: [Select]
Eustass "Captain" Kidand the ' " ' is breaking the plugin. The plugin prints the following upon trying to promote this player and ends up permanently promoting him every 10 seconds:

Code: [Select]
Command "ulx adduser", argument #1: No target found or target has immunity!

Fixed is newest version.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Tomzen on May 17, 2015, 02:49:32 AM
http://forums.ulyssesmod.net/index.php/topic,5312.0.html (http://forums.ulyssesmod.net/index.php/topic,5312.0.html) ??
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on May 17, 2015, 06:29:26 PM
http://forums.ulyssesmod.net/index.php/topic,5312.0.html (http://forums.ulyssesmod.net/index.php/topic,5312.0.html) ??

As said in the original post, this addon was originally made by Lead4u, I know him, and he's been one of my friends on steam for quite a number of years now. He originally made the addon for my server, but then told him he can release it to the public. He released it with the help of Stickyman (which at the time, wasn't even a real big part of ulx), but his script became outdated, and stopped working, so I uploaded the repaired version of it, and yeah.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Belly136 on June 01, 2015, 07:05:14 AM
Well, after i updated my server today  i got
Code: [Select]
ULib queue error: addons/apromote/lua/ulx/xgui/server/sv_apromote.lua:119: Tried to use a NULL entity! server side.

Garry ruined everything again  :'(
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on June 01, 2015, 11:13:27 PM
Well, after i updated my server today  i got
Code: [Select]
ULib queue error: addons/apromote/lua/ulx/xgui/server/sv_apromote.lua:119: Tried to use a NULL entity! server side.

Garry ruined everything again  :'(

I'll checfk it out, but I want to hope that you're wrong.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Belly136 on June 13, 2015, 10:31:54 PM
Can you increase time before players are promoted a bit on spawn? I'm using MySQL for usergroups and it has over 100 players so it takes time to load. Users from donator group sometimes get promoted to their old rank then i have to manually add them back again.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on June 14, 2015, 01:53:15 PM
Can you increase time before players are promoted a bit on spawn? I'm using MySQL for usergroups and it has over 100 players so it takes time to load. Users from donator group sometimes get promoted to their old rank then i have to manually add them back again.

Someone with more knowledge most on this subject will most likely will correct me. Anyways.


According to what I just read on your post, it doesn't really make much sense. If you're using SQL, then time isn't really such a problem, if you are actually using MySQL, time really still isn't a problem. That's the magic on how an SQL server works, time isn't really a problem in a factor.

As for speeding it up, it's just a timer every 10 seconds. What your real problem would be is well, actually I have really no clue, maybe utime being delayed or something. Because I'm not sure how or why your donator group is getting affected. It sounds like something else to me, because your donate group should be at -1, which means it gets ignored..

So really, I have no clue how to fix your issue.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Tomzen on June 14, 2015, 07:16:48 PM
Someone with more knowledge most on this subject will most likely will correct me. Anyways.


According to what I just read on your post, it doesn't really make much sense. If you're using SQL, then time isn't really such a problem, if you are actually using MySQL, time really still isn't a problem. That's the magic on how an SQL server works, time isn't really a problem in a factor.

As for speeding it up, it's just a timer every 10 seconds. What your real problem would be is well, actually I have really no clue, maybe utime being delayed or something. Because I'm not sure how or why your donator group is getting affected. It sounds like something else to me, because your donate group should be at -1, which means it gets ignored..

So really, I have no clue how to fix your issue.

I'm guessing he means his "donators" that have donated and put into the donator rank, get moved into a specific group when they hit the time, example: I donate on your server at 10 hours, then 2 hours later (at 12 hours) I get moved to the regular rank, then I have to get the owner/staff to move me back to donator as well as prove that I did donate.

I'm assuming this could be fixed by adding ply:IsUserGroup( "donator" ) ... or perhaps you know a better way then my basic lua.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on June 15, 2015, 09:41:43 PM
I'm guessing he means his "donators" that have donated and put into the donator rank, get moved into a specific group when they hit the time, example: I donate on your server at 10 hours, then 2 hours later (at 12 hours) I get moved to the regular rank, then I have to get the owner/staff to move me back to donator as well as prove that I did donate.

I'm assuming this could be fixed by adding ply:IsUserGroup( "donator" ) ... or perhaps you know a better way then my basic lua.

Well I understood that for the most part, but his group donator should be set to -1, and it will be ignored if the players in that group. Meaning he SHOULDN'T be put to any group, this is of course the user's problem if ULX is not responding fast enough. As he mentioned, he's using a database version of ulx (which to my knowledge does not exist), so it would be the delay to fetch the users group is the problem, and with that I can not fix.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Belly136 on June 19, 2015, 09:31:26 AM
My donator group is set to -1. It takes a lot of time to load usergroups because there's tons of users. So when a player from usergroup donator joins he's actually in a user usergroup for first few seconds. Long enough for apromote to add him to another group.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on June 19, 2015, 07:28:43 PM
My donator group is set to -1. It takes a lot of time to load usergroups because there's tons of users. So when a player from usergroup donator joins he's actually in a user usergroup for first few seconds. Long enough for apromote to add him to another group.

Yeah, I can't do anything about that. This is a problem with ULX, and has been discussed before in the past.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: H3llGhost on June 20, 2015, 01:23:03 PM
Is there any possibility to see your plugin on github?
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on June 20, 2015, 02:33:13 PM
Is there any possibility to see your plugin on github?

Yes, there is a possibility.
No, it's currently not on github, as there is no reason to put it on github for the most part of this addon never really getting updated again.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: H3llGhost on June 20, 2015, 02:45:41 PM
That is the reason, I want to update it and add some features.
It would be easier to have for all plugins a central location instead of maintaning them via uploads or similar.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on June 21, 2015, 03:14:04 AM
That is the reason, I want to update it and add some features.
It would be easier to have for all plugins a central location instead of maintaning them via uploads or similar.

As said prior, I couldn't imagine what else could be added on to this, though upon your request here -> https://github.com/chaos12135/ulx_auto_promote
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Krogas on July 02, 2015, 09:06:10 AM
On my Server the VIP and the staff are getting demoted to normal users because of a Promotion addon ( http://forums.ulyssesmod.net/index.php?topic=6791.0 (http://forums.ulyssesmod.net/index.php?topic=6791.0) ) any Ideas how i could fix that?

Edit: Woops I intended to post this in another topic ^^ but I think I got the same problem as Belly136
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Caustic Soda-Senpai on July 02, 2015, 12:51:52 PM
Turn off the auto demote and make sure their ranks aren't touched by the AutoPromote.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on July 02, 2015, 05:04:15 PM
If Staff are set to -1 and VIP are also set to -1 then, then it should all work without any issues you are experiencing.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Krogas on July 07, 2015, 05:23:20 AM
Okay first of all this appears only on mysql storing of userranks. We need this because of many ranks which were given to the user.txt (~20k entries), causing huge lags when promoting someone.

The problem is that when we changed to some specific maps we encountered the promotion of our staff and vips to other ranks because they were still declared as user (which will be promoted after some hours) while connecting to the server. This was saved in the database.

I changed checkPlayer() and added an initial spawn hook in sv_apromote.lua to pass some time before the promotion system handles the freshly connected user
Code: [Select]
local function checkPlayer( ply )
if ply.check_time < 6 then
ply.check_time = ply.check_time + 1
else
local plyhours = math.floor( ply:GetUTimeTotalTime() / 3600 )
local usrgrp = ply:GetUserGroup()
local Rank = ""
local Hours = 0

for k, v in pairs( APromote["grp"] ) do
if plyhours >= tonumber( v ) and tonumber( v ) >= Hours then
if tonumber( v ) >= 0 then
Rank = k
Hours = tonumber( v )
end
end
end
if (!ply:IsUserGroup(Rank) and Rank != "") then
if tonumber( APromote["grp"][usrgrp]) != -1 then
if not tobool( GetConVarNumber( "ap_auto_demote" ) ) and APromote["grp"][usrgrp] != nil
and Hours < tonumber( APromote["grp"][usrgrp] ) then
return
else
if ply:IsConnected() then
RunConsoleCommand( "ulx", "adduser", ply:Nick(), Rank )
PlayRankSound( ply )
end
end
end
end
end
end

hook.Add( "PlayerInitialSpawn", "check_time_set", function( ply )
ply.check_time = 0
end)

May not be very professional but its working for us scince 3 days now. Please tell me if I just had luck and I'm writing bullshit right now xD
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on July 09, 2015, 11:28:48 PM
The reason I didn't do the initial spawn thing is because then it wouldn't automatically promote someone when they reach their time. They'd have to leave and join back.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: BetrayingFate on July 10, 2015, 11:58:49 PM
One of the larger issues we are having with our server ad this add-on is similar to that of may others, We have All of our staff ranks excluded from the auto promote system, however, when they log into the server, the system "promotes" them to the rank of the hours they had on the server instead of allowing them to stay as a staff member. Secondly, I tried deactivating the add-on and I realized that the staff were not keeping there rank even with the add-on off. Is this a server issue or the add-on issue?
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Krogas on July 12, 2015, 02:23:51 PM
The reason I didn't do the initial spawn thing is because then it wouldn't automatically promote someone when they reach their time. They'd have to leave and join back.

well I just let some seconds pass before the promoting begins. Until now everything works fine!  ;D
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Aaron113 on July 13, 2015, 10:02:57 AM
Is this a server issue or the add-on issue?
Sounds like a addon issue... Specially ULX/ULib.  You have to solve what's going on there first.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: JamminR on July 13, 2015, 07:29:41 PM
Not sure ULib can fix it.
As we've stated in several posts scattered through out the forums, mostly in General help, Gmod uses a flat text file for groups.
We expand on that, very much.
Gmod, and ULib, can only load so much data at a time before the server would give errors on it's own.
We've added queued calls over time to alleviate this.
Gmod was never designed to have hundreds of users in a group other than default "user" (which requires no code lookup like any other group would)
If your going to use an autopromote system for groups,
1) make sure the autopromote waits some time after spawn before checking. (Pretty sure we even have callbacks for this once Ulib group has changed/loaded for a user)
2) even better, don't make it so easy for people to leave "user" and get added to the <whatever group> stored in ULib by your autopromote config.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: William Sublett on July 20, 2015, 07:42:54 PM
yay thanks "__"
Title: Re: Autopromote XGUI Version [4.09v]
Post by: M21z on August 05, 2015, 04:44:53 AM
Cool! I have been looking for something like this.. Thanks  :'(
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Aerosoft on August 10, 2015, 06:37:32 PM
Hi! I'm having a problem with the ulx auto promote addon where it is spamming an error in my console

Code: [Select]
ULib queue error: addons/ulx_auto_promote/lua/ulx/xgui/server/sv_apromote.lua:110: attempt to call method 'GetUTimeTotalTime' (a nil value)
Here is the lua code

Code: [Select]
---------------------------------------------------------------
// APromoteGUI by Lead4u, Modified and Fixed by Mr. Apple    //
// Version: 3.5 Full Release                                 //
---------------------------------------------------------------

resource.AddFile("materials/gui/silkicons/cog.vmt")

ULib.ucl.registerAccess( "apromote_settings", "superadmin", "Allows managing all settings related to APromote.", "XGUI" )

local APromote = {}
local set = {} APromote["set"] = set
local grp = {} APromote["grp"] = grp

util.AddNetworkString( "doApShinys" )

local function Save()
file.Write( "ulx/apromote.txt", ULib.makeKeyValues( APromote ) )
end

local function APUpdateGroups()
//for added groups
for k, v in pairs(ULib.ucl.groups) do
if ( APromote["grp"][k] == nil and k != "user") then
print("Added " .. k .. " to APromote.")
APromote["grp"][k] = -1
end
end
for k, v in pairs(APromote["grp"]) do
if ( k != nil and !ULib.ucl.groups[k]) or k == "user" then
print("Removed " .. k .. " from APromote.")
APromote["grp"][k] = nil
end
end
xgui.sendDataTable( {}, "AP_SendData" )
Save()
end

local function loadAP()
xgui.addDataType( "AP_SendData", function() return APromote["grp"] end, "apromote_settings", 0, 0 )

// File Stuffs
if not file.Exists( "ulx/apromote.txt", "DATA" ) then
for k, v in pairs(ULib.ucl.groups) do
APromote["grp"][k] = -1
end
APromote["set"]["ap_enabled"] = 1
APromote["set"]["ap_snd_enabled"] = 1
APromote["set"]["ap_snd_scope"] = 1
APromote["set"]["ap_effect_enabled"] = 1
APromote["set"]["ap_auto_demote"] = 0
Save()
else
APromote = ULib.parseKeyValues( file.Read( "ulx/apromote.txt" ) )
end
// ConVars
ULib.replicatedWritableCvar("ap_enabled","rep_ap_enabled", APromote["set"]["ap_enabled"],false,false,"apromote_settings")
ULib.replicatedWritableCvar("ap_snd_enabled","rep_ap_snd_enabled",APromote["set"]["ap_snd_enabled"] ,false,false,"apromote_settings")
ULib.replicatedWritableCvar("ap_snd_scope","rep_ap_snd_scope",APromote["set"]["ap_snd_scope"] ,false,false,"apromote_settings")
ULib.replicatedWritableCvar("ap_effect_enabled","rep_ap_effect_enabled",APromote["set"]["ap_effect_enabled"] ,false,false,"apromote_settings")
ULib.replicatedWritableCvar("ap_auto_demote","rep_ap_auto_demote",APromote["set"]["ap_auto_demote"] ,false,false,"apromote_settings")
// Data and Hook Add
xgui.sendDataTable( {}, "AP_SendData" )
hook.Add( "UCLChanged", "doApUpdateSV", APUpdateGroups )
end

local function cVarChange( sv_cvar, cl_cvar, ply, old_val, new_val )
if ( sv_cvar =="ap_enabled" or sv_cvar=="ap_snd_enabled" or sv_cvar=="ap_snd_scope" or sv_cvar=="ap_effect_enabled" or sv_cvar=="ap_auto_demote" ) then
APromote["set"][sv_cvar] = new_val
Save()
end
end

local function PlayRankSound( ply )
if ( GetConVarNumber( "ap_effect_enabled" ) == 1 ) then
net.Start( "doApShinys" )
net.WriteEntity( ply )
net.Broadcast()
end
if ( GetConVarNumber( "ap_snd_enabled" ) == 1) then
if ( GetConVarNumber( "ap_snd_scope" ) == 1 ) then
for k, v in pairs(player.GetAll()) do
v:SendLua("surface.PlaySound( \"/garrysmod/save_load1.wav\" )")
end
elseif ( GetConVarNumber( "ap_snd_scope" ) == 0) then
ply:SendLua("surface.PlaySound( \"/garrysmod/save_load1.wav\" )")
end
end
end

local function isValidCommand( command, compare )
for k, v in pairs( compare ) do
if ( command[1] == k ) then
if ( type( command[2] == "number")) then
return true
end
end
end
return false
end

concommand.Add("APGroup", function( ply, cmd, args )
if (ply:query( "apromote_settings" ) and isValidCommand( args, APromote["grp"] )) then
APromote["grp"][args[1]] = tonumber(args[2])
xgui.sendDataTable( {}, "AP_SendData" )
Save()
end
end)
 
local function checkPlayer( ply )
local plyhours = math.floor( ply:GetUTimeTotalTime() / 3600 )
local usrgrp = ply:GetUserGroup()
local Rank = ""
local Hours = 0

for k, v in pairs( APromote["grp"] ) do
if plyhours >= tonumber( v ) and tonumber( v ) >= Hours then
if tonumber( v ) >= 0 then
Rank = k
Hours = tonumber( v )
end
end
end
if (!ply:IsUserGroup(Rank) and Rank != "") then
if tonumber( APromote["grp"][usrgrp]) != -1 then
if not tobool( GetConVarNumber( "ap_auto_demote" ) ) and APromote["grp"][usrgrp] != nil
and Hours < tonumber( APromote["grp"][usrgrp] ) then
return
else
if ply:IsConnected() then
RunConsoleCommand( "ulx", "adduserid", ply:SteamID(), Rank )
PlayRankSound( ply )
end
end
end
end
end

timer.Create("doAPUpdateTimer", 10, 0, function()
if not tobool( GetConVarNumber( "ap_enabled" ) ) then return end
for k, v in pairs( player.GetAll() ) do
if (v:IsPlayer() and v:IsValid() and !v:IsBot()) then
ULib.queueFunctionCall( checkPlayer, v )
end
end
end)

xgui.addSVModule( "AP_LoadAP", loadAP )
hook.Add( "ULibReplicatedCvarChanged", "APGroupCVAR", cVarChange )
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Aaron113 on August 14, 2015, 07:50:45 AM
Do you have UTime installed (which the first post says is required)?

EDIT: nvm, you posted twice about it.

http://forums.ulyssesmod.net/index.php/topic,8864.msg45239.html#new (http://forums.ulyssesmod.net/index.php/topic,8864.msg45239.html#new)
Title: Re: Autopromote XGUI Version [4.09v]
Post by: JamminR on August 14, 2015, 10:00:23 PM
Do you have UTime installed (which the first post says is required)?
EDIT: nvm, you posted twice about it.
And he's still not answered that question to either post.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Roberito on December 23, 2015, 12:34:53 PM
hey i added your ulx auto promote addons and i added utime to my server but auto promote wont show up in my !menu please help!
Title: Re: Autopromote XGUI Version [4.09v]
Post by: theGoldTrigger on December 27, 2015, 02:26:36 PM
Question:
Let's say I have a group called member that I do not want people to be auto promoted to and a group called trusted that I do want people to be auto promoted to. Is it possible to set someone to the member group manually and still have them be autopromoted to trusted?

Ex: of what I mean
(https://i.imgur.com/Njt9R1i.jpg)
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on December 31, 2015, 10:36:18 PM
Question:
Let's say I have a group called member that I do not want people to be auto promoted to and a group called trusted that I do want people to be auto promoted to. Is it possible to set someone to the member group manually and still have them be autopromoted to trusted?

Ex: of what I mean
(https://i.imgur.com/Njt9R1i.jpg)
[/quote

No, that's literally impossible with ulx/ulib in general. You'd have to extremely alter ulib/ulx.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: ????????? ???????? on January 02, 2016, 10:52:04 PM
From yesterday autopromote and awarn doesnt work on my server. I got 3 errors when i have started server.
(http://i.imgur.com/bOoYMR7.jpg)
I have tried to update all these addons (ulx, ulib, utime, apromote, awarn) but nothing changes. One thing that i know right now, that everything gone wrong with apromote. If i delete it - everything works fine. But with it i got 3 errors on start and nothing works properly.

P.S. Sorry for my login name.. Login with Google
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Bite That Apple on January 07, 2016, 02:39:00 AM
From yesterday autopromote and awarn doesnt work on my server. I got 3 errors when i have started server.
(http://i.imgur.com/bOoYMR7.jpg)
I have tried to update all these addons (ulx, ulib, utime, apromote, awarn) but nothing changes. One thing that i know right now, that everything gone wrong with apromote. If i delete it - everything works fine. But with it i got 3 errors on start and nothing works properly.

P.S. Sorry for my login name.. Login with Google

Post this in the general help here: http://forums.ulyssesmod.net/index.php/board,11.0.html

This is an an issue I can fix, due to it not being my addon's issue. My suggestion is delete ulx/ulib addon folders and reinstall it
Title: Re: Autopromote XGUI Version [4.09v]
Post by: TT=open again Isabella Jazzlyn on January 22, 2016, 01:33:20 AM
I uploaded the addon on my server. but it does not show up did i forgot something?
Title: Re: Autopromote XGUI Version [4.09v]
Post by: roastchicken on January 22, 2016, 08:07:03 AM
where did you put the addon's folder?

did you restart the server?

what did you do to check if the addon was installed? "it does not show up"
Title: Re: Autopromote XGUI Version [4.09v]
Post by: TT=open again Isabella Jazzlyn on January 23, 2016, 02:09:26 PM
it is fixed now uploaded it wrong my bad
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Gr0m3r on April 13, 2017, 06:29:25 AM
Thanks, this tool is really helpful :D
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Codingale on September 12, 2017, 06:02:25 PM
Not sure if this has been asked before, but can you have multiple auto-promote trees?


EG:

user -> Newbie (1hr) -> Regular (3hr)
BUT also have something at the same time like
Trusted Newbie (-1) -> Trusted Regular (1hr)

Is there a way for that or would I have to either, A find something else or B just give up


I mean I could modify it probably but, I'm far to lazy for that..
Title: Re: Autopromote XGUI Version [4.09v]
Post by: JamminR on September 12, 2017, 06:51:44 PM
This does not have branches.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Codingale on September 12, 2017, 06:57:27 PM
Know of any that do have branches by chance? Thanks and sorry for getting of topic.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Windwhistle on November 06, 2017, 07:14:59 AM
Post this in the general help here: http://forums.ulyssesmod.net/index.php/board,11.0.html

This is an an issue I can fix, due to it not being my addon's issue. My suggestion is delete ulx/ulib addon folders and reinstall it

I completely disagree with you on the statement that this isn't your addon's issue. I'm getting the same error with your addon. Everything works fine as soon as I remove your addon.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: JamminR on November 06, 2017, 03:40:56 PM
I'm getting the same error with your addon. Everything works fine as soon as I remove your addon.

Windwhistle, you're linking to a post made almost 2 years ago, that contains screenshots of an error from a totally different addon than autopromote.
The error the user at the time gave, in my opinion as a developer, didn't include any hint of error due to Autopromote for XGUI.

That being said, if you'd please provide a copy / paste of the error(s) you are getting from your console that you experience, it would help anyone that still may wish to help with this (now pretty old in Gmod terms) 2.5 year old addon possibly do so.
Title: Re: Autopromote XGUI Version [4.09v]
Post by: Paradxse on April 23, 2019, 09:41:11 AM
tysm man, i had errors with it for a long time until i installed this one!