Quote:
Originally Posted by edon1337
This code seems like a bunch of copy-pasting, especially Elite Admin System.
Suggestions:
1. You're only pre-caching 1 model from the array, then breaking the loop, resulting into server crash because of un-precached models.
PHP Code:
public plugin_precache(){ g_playerData = ArrayCreate(PlayerData); ReloadFile(); new iPlayer[PlayerData]; for(new i; i < ArraySize(g_playerData); i++) { ArrayGetArray(g_playerData,i,iPlayer) new szModel[64] if(iPlayer[Player_ModelCT][0]) { formatex(szModel,charsmax(szModel),"models/player/%s/%s.mdl",iPlayer[Player_ModelCT],iPlayer[Player_ModelCT]) precache_model(szModel) } if(iPlayer[Player_ModelT][0]) { formatex(szModel,charsmax(szModel),"models/player/%s/%s.mdl",iPlayer[Player_ModelT],iPlayer[Player_ModelT]) precache_model(szModel) } break; } }
2. Don't use ResetHUD to set models, it's not the appropriate event.
3. Implement ML
|
for the suggestion #2: - For now it will be like this, it's working very well every round the player model is reseting as it means to be.
ML - will be added later when i finish with /vm menu.
EDIT: The bug with precaching models should be fixed now. Updated the first post with a new update.