Raised This Month: $32 Target: $400
 8% 

Help with model precaching


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Saint Sinner
Senior Member
Join Date: Feb 2016
Old 02-22-2018 , 04:04   Help with model precaching
Reply With Quote #1

I have a folder Knife with 14 knifes why not download it?


Code:
public plugin_precache() 
{
	load_knifes_cfg();
	
	precache_model("models/v_knife.mdl");
	precache_model("models/p_knife.mdl");
	
	new path[64]; 
	
	for(new i = 0; i <= knifes_loaded-2; i++)
	{
		formatex(path, charsmax(path), "models/Knife/v_%s.mdl", file_names[i]);
		if(file_exists(path))
			precache_model(path);
		else
			log_error(AMX_ERR_NOTFOUND, "Model %s not found!",path );
		if (p_model_exist[i])
		{
			formatex(path, charsmax(path), "models/Knife/p_%s.mdl", file_names[i]);
			if(file_exists(path))
				precache_model(path);
			else
				log_error(AMX_ERR_NOTFOUND, "Model %s not found!",path );
		}
	}
	
	for (new Emith:i = Select; i<Emith; i++)
		precache_sound(sound[i]);
	
	if(!dir_exists("addons\amxmodx\configs\Knife\logs"))
	{
		mkdir("addons\amxmodx\configs\Knife");
		mkdir("addons\amxmodx\configs\Knife\logs");
	}
}
FIXED

Last edited by Saint Sinner; 02-22-2018 at 05:15.
Saint Sinner is offline
Reply


Thread Tools
Display Modes

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 04:38.


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