Nice simple configuration, chaos. What does auto demote do?
Also, this is apparently my 5300th post. I feel old.
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
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.
Hi there,
So, essentially what it says in the title: can Apromote work with inheritance disabled?
Thanks
Haz
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.
1 day is not 30 hours...
Sorry , my fault . I want to say 1 day 6 hours .
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.
Missing quote? XDHe quoted your post, but it only contained his quote. Basically, quotes that contain a quote won't show the quote.
Missing quote? XD
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!
Lets say it isnt? Im curious what would happen?
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?
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.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?
"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. :(
Updated All Plugins:<3
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
Thanks for the tip, but it didn't help. :/
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.
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? ???
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
Eustass "Captain" Kid
and 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:Command "ulx adduser", argument #1: No target found or target has immunity!
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)
Hey Bite That Apple, I'm reporting a bug with a player here.
The player is namedCode: [Select]Eustass "Captain" Kid
and 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!
http://forums.ulyssesmod.net/index.php/topic,5312.0.html (http://forums.ulyssesmod.net/index.php/topic,5312.0.html) ??
ULib queue error: addons/apromote/lua/ulx/xgui/server/sv_apromote.lua:119: Tried to use a NULL entity!
server side.Well, after i updated my server today i gotCode: [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 :'(
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.
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.
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.
Is there any possibility to see your plugin on github?
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.
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)
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.
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.
ULib queue error: addons/ulx_auto_promote/lua/ulx/xgui/server/sv_apromote.lua:110: attempt to call method 'GetUTimeTotalTime' (a nil value)
---------------------------------------------------------------
// 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 )
Do you have UTime installed (which the first post says is required)?And he's still not answered that question to either post.
EDIT: nvm, you posted twice about it.
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.
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
I'm getting the same error with your addon. Everything works fine as soon as I remove your addon.