I can give you some suggestions:
1. Use button id instead of model
2. Save buttons to one file
You can look into this post:
https://forums.alliedmods.net/showth...16#post2433716
It works with button id , why you use model?
Look:
PHP Code:
if(pev_valid(iEnt) && pev(iEnt, pev_iuser2) == MARKED_BUTTON)
{
pev(iEnt, pev_model, szModel, charsmax(szModel))
fprintf(iFilePointer, "%s %s %d^n", g_szButtons[i], szModel, iEnt)
iCount++
}
PHP Code:
if(pev_valid(iEnt) && pev(iEnt, pev_iuser2) == MARKED_BUTTON)
{
fprintf(iFilePointer, "%s %d^n", g_szButtons[i], iEnt) // button class and button's id , why to save by model if you can simply add iEnt ,which is button id?
iCount++
}