Originally Posted by Maximoose
L 07/12/2019 - 16:44:55: [SM]  Line 535, /home/forums/content/files/2/9/0/0/7/2/175749.attach::RemoveClientWeapons
To immediately stop the script timeout, change this cvar from 1 to 0: "sab_freezesurvivor". This change will kill the player if they are being swapped to the other team though.
The area that seems to have a problem is here:
void RemoveClientWeapons(int client)
for (int i = CS_SLOT_PRIMARY; i <= CS_SLOT_C4; i++)
while ((iEnt = GetPlayerWeaponSlot(client, i)) != -1)
SafeRemoveWeapon(client, iEnt, i);
The problem is inside the while loop. "(iEnt = GetPlayerWeaponSlot(client, i)) != -1" is never returning false, meaning the weapon in the current slot is never removed.
I never experienced this issue on my server. Can I have more information about your server, like a list of plugins? If there is a plugin that, for example, makes sure all players always have a knife or fists instead of no weapon, then I think that could cause this problem.
The reason this plugin removes the players weapons is because swapping a player at round-end can be confusing (you are suddenly able to shoot your teammates that survived). So, I give the swapped player god and remove their weapons/freeze them so they cannot kill or be killed until the next round.
If you are interested I can include this workaround: instead of removing their weapons, I can try setting their ammo to 0, so they cannot shoot at anyone (if you have knives they could possibly knife people who are close to them while frozen though). Or a different solution, it just depends on what your server is.