Ulysses Stuff > Releases
Autopromote XGUI Version [4.09v]
Caustic Soda-Senpai:
Turn off the auto demote and make sure their ranks aren't touched by the AutoPromote.
Bite That Apple:
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.
Krogas:
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: ---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)
--- End code ---
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
Bite That Apple:
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.
BetrayingFate:
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?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version