So, I want to precache files by cvar.
PHP Code:
public plugin_precache() { // precache
new modelname_te[32],modelname_ct[32] // getting cvars' string
get_cvar_string("amx_adminmodels_model_te",modelname_te,31)
get_cvar_string("amx_adminmodels_model_ct",modelname_ct,31)
new locmodelte[128],locmodelct[128] // formating it with location
format(locmodelte,127,"models/player/%s/%s.mdl",modelname_te,modelname_te)
format(locmodelct,127,"models/player/%s/%s.mdl",modelname_ct,modelname_ct)
precache_model(locmodelct) // precache preformated models
precache_model(locmodelte)
return PLUGIN_CONTINUE
}
I've got only one problem:
HLDS precaches files faster than cvars, its want to precache only models/player//.mdl without the cvar.
Are there any solution 4 it?