My server crashes after a while with the error:
PHP Code:
Warning: Table DynamicModels is full, can't add <model string>
I dumped the string tables and noticed there is a 2048 item limit on the DynamicModels table and it appears to add a new entry every time someone equips a cosmetic that isn't already in the table, hence the crash when it reaches 2048. I tried removing an entry with:
PHP Code:
int iDynamicModelsStringTable = FindStringTable("DynamicModels");
int index = FindStringIndex(iDynamicModelsStringTable, "models/player/items/Scout/Scout_spiral.mdl");
if (iDynamicModelsStringTable != INVALID_STRING_INDEX) {
bool bPreviousState = LockStringTables(false);
SetStringTableData(iDynamicModelsStringTable, index, "", 0);
LockStringTables(bPreviousState);
} else {
SetFailState("Could not find DynamicModels string index in table.");
}
but it had no effect. Is there any way to clear this table without having to restart the map/server?