Chuckun Posted October 11, 2013 Share Posted October 11, 2013 (edited) I am requesting a new shuffle server cvar to prevent players from switching teams until after a predifined period of time.. For example, g_shuffle_staytime 300 would prevent players from switching teams until 5 minutes after any shuffle (be it via shrubbot command or auto shuffle). This would be SO helpful. If this were to be implemented, it should not affect !putteam, as there are occasions where people DO need to move soon after a shuffle (if a player leaves for example), but dealing with this manually would be so much better than dealing with all the team stackers we have every day.. Could it be implemented? If you need any extra infos I will be stalking so feel free to ask Edited October 11, 2013 by Chuckun Jhonny/Shinobi and hellreturn 2 Quote Link to comment Share on other sites More sharing options...
Sol Posted October 11, 2013 Share Posted October 11, 2013 (edited) MINIMAL_LEVEL_TOEXECUTE = 20 -- minimal level to execute this command SHUFFLE_COMMAND = "!shuffle" -- shuffle command SHUFFLE_AFTERTIME = 5*60 -- 5min Client = { } function et_InitGame( levelTime, randomSeed, restart ) maxclients = et.trap_Cvar_Get( "sv_maxclients" ) end function et_ClientCommand( num, cmd ) local arg0 = string.lower(cmd) local arg1 = string.lower(et.trap_Argv(1)) if et.G_shrubbot_level( num ) >= MINIMAL_LEVEL_TOEXECUTE and arg0 == SHUFFLE_COMMAND or arg1 == SHUFFLE_COMMAND then StartTime = os.time() for i = 0, maxclients - 1 do local team = et.gentity_get(i, "sess.sessionTeam") if team ~= 3 then Client[i] = team end end return true -- let execute it end if arg0 == "team" and StartTime ~= nil then if arg1 == "b" then if os.time() >= (StartTime + SHUFFLE_AFTERTIME) and Client[num] == 1 then return false end elseif arg1 == "r" then if os.time() >= (StartTime + SHUFFLE_AFTERTIME) and Client[num] == 2 then return false end end end end It is just concept but it should works, in this case they won't be able to change to ->spec-> another team too Edited October 11, 2013 by solaЯ Chuckun, Jhonny/Shinobi, hellreturn and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Chuckun Posted October 12, 2013 Author Share Posted October 12, 2013 (edited) MINIMAL_LEVEL_TOEXECUTE = 20 -- minimal level to execute this command SHUFFLE_COMMAND = "!shuffle" -- shuffle command SHUFFLE_AFTERTIME = 5*60 -- 5min Client = { } function et_InitGame( levelTime, randomSeed, restart ) maxclients = et.trap_Cvar_Get( "sv_maxclients" ) end function et_ClientCommand( num, cmd ) local arg0 = string.lower(cmd) local arg1 = string.lower(et.trap_Argv(1)) if et.G_shrubbot_level( num ) >= MINIMAL_LEVEL_TOEXECUTE and arg0 == SHUFFLE_COMMAND or arg1 == SHUFFLE_COMMAND then StartTime = os.time() for i = 0, maxclients - 1 do local team = et.gentity_get(i, "sess.sessionTeam") if team ~= 3 then Client[i] = team end end return true -- let execute it end if arg0 == "team" and StartTime ~= nil then if arg1 == "b" then if os.time() >= (StartTime + SHUFFLE_AFTERTIME) and Client[num] == 1 then return false end elseif arg1 == "r" then if os.time() >= (StartTime + SHUFFLE_AFTERTIME) and Client[num] == 2 then return false end end end end It is just concept but it should works, in this case they won't be able to change to ->spec-> another team too Sweeeet thank you Now to try get our server admin while he has a moment to integrate it Edited October 12, 2013 by Chuckun Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.