PHP Code:
public plugin_precache() { // precache
register_cvar("amx_adminmodels_model_te","models/tmodel.mdl")
register_cvar("amx_adminmodels_model_ct","models/ctmodel.mdl")
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
}
With this, it should work...
__________________