[Release] (T6ZM) Prevent Players Joining In-Progress After Rounds
-
Quick script that kicks any people who join after the defined round.
https://github.com/CoreyUK/T6ZM-Scripts/blob/main/Join-in-progress-script/PostRoundLock.gsc
-
Quick script that kicks any people who join after the defined round.
https://github.com/CoreyUK/T6ZM-Scripts/blob/main/Join-in-progress-script/PostRoundLock.gsc
CUKServers Alternatively, and probably better than kicking random players from your server would be to set a password on the server. You can do this by setting the dvar g_password to some value that no one can guess and then setting it to blank when the game ends.
-
CUKServers Alternatively, and probably better than kicking random players from your server would be to set a password on the server. You can do this by setting the dvar g_password to some value that no one can guess and then setting it to blank when the game ends.
JezuzLizard these servers are hosted publicly and I wish for everyone to have access to them, having this script prevents people interrupting an ongoing EE Run or something of that nature, when more players join a game it changes zombie count which a new player can’t possibly pick up the slack as there starting with a pistol. I’d love to have password only servers but nobody is interested in joining a discord for the password so they can remain uninterrupted
-
JezuzLizard these servers are hosted publicly and I wish for everyone to have access to them, having this script prevents people interrupting an ongoing EE Run or something of that nature, when more players join a game it changes zombie count which a new player can’t possibly pick up the slack as there starting with a pistol. I’d love to have password only servers but nobody is interested in joining a discord for the password so they can remain uninterrupted
CUKServers You can set the password midgame and then remove it when the game ends it also updates it in the server list so you know as a player if youre supposed to be able to join a server or not
-
CUKServers You can set the password midgame and then remove it when the game ends it also updates it in the server list so you know as a player if youre supposed to be able to join a server or not
chicken emoji ahh i see i miss understood, i'll give that a try when i have sometime
-
EDIT: Changed following JezuzLizard comment, Now uses a set round to trigger a lock on the server which is reset when game ends
Cheers
-
Great release, I tweeted this as it could be useful for people.
-
EDIT: Changed following JezuzLizard comment, Now uses a set round to trigger a lock on the server which is reset when game ends
Cheers
CUKServers As funny as that password is, if someone learns that the password is hardcoded to be that they can join anyway.
you can use this simple function to generate a random pin
generate_random_password() { str = ""; for ( i = 0; i < 4; i++ ) { str = str + randomInt( 10 ); } return str; }
Additionally, you can use setClientDvar() on all clients in the server with the password dvar set to that pin, and tell clients in the game the password. This way if a client gets disconnected they can still join back if they didn't close their game or they remember the password.
Heres what this would look like
pin = generate_random_password(); setDvar( "g_password", pin ); players = getPlayers(); for ( i = 0; i < players.size; i++ ) { players[ i ] setClientDvar( "password", pin ); players[ i ] iPrintLn( "Server is now locked use " + pin + " password to rejoin" ); }
-
CUKServers As funny as that password is, if someone learns that the password is hardcoded to be that they can join anyway.
you can use this simple function to generate a random pin
generate_random_password() { str = ""; for ( i = 0; i < 4; i++ ) { str = str + randomInt( 10 ); } return str; }
Additionally, you can use setClientDvar() on all clients in the server with the password dvar set to that pin, and tell clients in the game the password. This way if a client gets disconnected they can still join back if they didn't close their game or they remember the password.
Heres what this would look like
pin = generate_random_password(); setDvar( "g_password", pin ); players = getPlayers(); for ( i = 0; i < players.size; i++ ) { players[ i ] setClientDvar( "password", pin ); players[ i ] iPrintLn( "Server is now locked use " + pin + " password to rejoin" ); }
JezuzLizard Added to script