Precaching models
how to precache models using cvar ? i have a config file myconfig.cfg and exec it to server in this file some cvars and model cvar but plugin doesn't work
myconfig.cfg cvar_mymodel = "someModel" amxx sample: PHP Code:
|
Re: Precaching models
First of all:
PHP Code:
|
Re: Precaching models
Quote:
|
Re: Precaching models
Don't have to include engine...
|
Re: Precaching models
Not tested, should work
PHP Code:
cvar_mymodel "vip" |
Re: Precaching models
Even if fakemeta is already included for other reasons, use precache_model, precache_generic and precache_sound.
Optimization is trivially trivial for this specific example, but it's better to have good habits. Read this : http://forums.alliedmods.net/showthread.php?t=88792 IMO cvars are not appropriated when precache is involved, because once precache is passed you can't do nothing anymore, so a .cfg or .ini file read during precache should be better. |
Re: Precaching models
Quote:
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. |
Re: Precaching models
Quote:
this is good idea. I will try ( read a file in precache ). |
Re: Precaching models
Anyway, the problem on your plugin is that plugin_precache is fired BEFORE plugin_init, so do all stuff in plugin_precache and it's fine.
|
Re: Precaching models
Quote:
Do like Connor said if not working... |
| All times are GMT -4. The time now is 05:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.