Raised This Month: $ Target: $400
 0% 

Precaching models


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mettyou
Junior Member
Join Date: Apr 2008
Old 06-04-2010 , 14:31   Re: Precaching models
Reply With Quote #1

Quote:
Originally Posted by Kryzu View Post
Not tested, should work

PHP Code:
#include <amxmodx>

new szModelDir[64];

public 
plugin_init() {
    
register_plugin("Model precache""0.1""Kryzu")
    
    new 
g_pModelDir register_cvar("cvar_mymodel""someModel")
    new 
szModel[12]; //I have no idea how much chars there can be

    
get_pcvar_string(g_pModelDirszModelcharsmax(szModel))
    
formatex(szModelDirsizeof(szModelDir) -1"models/%s/%s.mdl"szModelszModel);
}
public 
plugin_precache(){
    
precache_model(szModelDir);

Your cvar example:
cvar_mymodel "vip"

this is same with my and should not work. Compiler doesn't give an error but in the game models doesn't show on the players.
mettyou is offline
Kryzu
Senior Member
Join Date: Feb 2009
Old 06-05-2010 , 06:41   Re: Precaching models
Reply With Quote #2

Quote:
Originally Posted by mettyou View Post
this is same with my and should not work. Compiler doesn't give an error but in the game models doesn't show on the players.
Well this plugin doesn't SET models. It only precaches them, as you asked...
Do like Connor said if not working...
__________________
Kryzu is offline
Reply



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 05:17.


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