Raised This Month: $ Target: $400
 0% 

Precache Speed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
djmd378
Senior Member
Join Date: Sep 2004
Old 08-03-2007 , 17:41   Re: Precache Speed
Reply With Quote #3

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...
__________________
djmd378 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode