[TF2] Unassigned Player Kicker (v3.0)
1 Attachment(s)
Introduction
This plugin kicks people who waste a player slot by sitting on the team selection screen to idle. I've encountered players doing this many times, and it is incredibly annoying. ConVars
Installation
Change Log
Spoiler
|
Re: [TF2] Unassigned Player Kicker (v1.0)
https://forums.alliedmods.net/showthread.php?t=163291
This plugin forces all spectating/unassigned players to join a team and class, even if the player had not joined a team since connecting. |
Re: [TF2] Unassigned Player Kicker (v1.1)
Some issues:
On line 58, you create a (default) 10-minute timer and pass a client index as the timer's parameter. When using timers or asynchronous callbacks, you need to pass the client's user ID (GetClientUserId) or serial (GetClientSerial), and use GetClientOfUserId or GetClientFromSerial to get a client index out of it. By passing a client index, if the client disconnects before the timer elapses, someone else might take their slot and be improperly kicked. Your else statement on line 83 is pointless. Your IsValidTeam stock is unnecessarily complex. You can just check if the client's team == 0 and return false. Or, for minimum lines of code: PHP Code:
|
Re: [TF2] Unassigned Player Kicker (v1.1)
Quote:
I've fixed the latter two issues, but the first one is a tad confusing for me. How exactly am I meant to implement GetClientOfUserId or GetClientFromSerial? |
Re: [TF2] Unassigned Player Kicker (v1.1)
Quote:
PHP Code:
|
Re: [TF2] Unassigned Player Kicker (v1.1)
Quote:
Thanks for the tips :D |
Re: [TF2] Unassigned Player Kicker (v1.2)
Updated to v1.2! Credit goes to Dr. McKay for showing me the little issues that this could've caused.
|
Re: [TF2] Unassigned Player Kicker (v1.2)
hey there, my server owner uses your plugin and it works like a charm, the only thing is that there isnt an option to skip admins or other flags when it checks, which is abit of a problem for us because our admins like to use the unnassigned team quite a lot, (being on unnassigned and then respawining and get booted after a short while on it
if you could add an option to ignore admin flags, that would be a wonderful addition thanks |
Re: [TF2] Unassigned Player Kicker (v1.2)
Quote:
|
Re: [TF2] Unassigned Player Kicker (v1.2)
hey, have you included the admin flag suggestion? just making sure you didnt forget about the little suggestion i made
thanks |
All times are GMT -4. The time now is 09:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.