[ANY] Map Slots Locker
1 Attachment(s)
Author: Dragokas (idea by rin-ale).
Description:
Map list is stored here (add new map names to lock the slots on them):
Specific:
TODO
Settings (ConVars): cfg/sourcemod/sm_maplocker.cfg:Commands: ("z" flag) Installation - Unpack and copy everything to addons/sourcemod/ChangeLog:
Spoiler
Donate Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often: |
Re: [ANY] Map Slots Locker
Updated.
Quote:
|
Re: [ANY] Map Slots Locker
Updated.
Quote:
|
Re: [ANY] Map Slots Locker
Updated.
Quote:
|
Re: [ANY] Map Slots Locker
After some digging around, I think setting "sv_maxplayers" to 1 may not be a good idea at all since not only the slots are limited but also the global MaxClients variable of the game is changed as well and most internal functions rely on the UTIL_* ones that seek the value of this variable which in turn would cause some strange oddities.
Maybe blocking mid-game connections through OnClientConnect (SM) / OnClientPreConnect (ConnectHook extension) would be a better solution? |
Re: [ANY] Map Slots Locker
2 Attachment(s)
Whaaaat? What is your test environment?
PHP Code:
|
Re: [ANY] Map Slots Locker
But it is good to have opportunity to send some meaningful message to client instead of just locking.
However, OnClientConnect may be too late. Need testing, which is not the easy part. Need concrete map, 2 people, and also bug is not always reproduced. |
Re: [ANY] Map Slots Locker
Quote:
Whenever the maximum amount of available slots is changed, it's also reflected in that function. If "sv_maxplayers" is set to 1, it will only verify the first client as a valid player and invalidate everyone else. For SourceTV enabled servers, only the SourceTV bot will be verified. |
Re: [ANY] Map Slots Locker
Update on my findings, saving the Steam IDs of clients who played in the previous map before it transitions to the faulty one and blocking newcomers with the use of OnClientPreConnect forward from ConnectHook extension seems to suffice as a bugless temporary fix for now since ConnectClient function runs before WriteBaselines.
|
Re: [ANY] Map Slots Locker
Thank you. If that works, it must be a genius temporarily solution.
|
All times are GMT -4. The time now is 14:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.