Thread: [Solved] precaching models 100% cpu
View Single Post
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 07-21-2023 , 10:18   Re: precaching models 100% cpu
Reply With Quote #13

Code:
if(containi(weaponmodel, ".mdl") == -1) {     log_to_file("DUMBLOG.log", "The model that you tried to precache doesn't have a .mdl extension. This error occurs when a section from csgoclassy.ini doesn't exists.") } server_print("You have a missing model ^"%s^" in the [DEFAULT] section of csgoclassy.ini", weaponmodel); set_fail_state("");

to

PHP Code:
if(containi(weaponmodel".mdl") == strlen(weaponmodel) - 4)
{
    
log_to_file("DUMBLOG.log""The model that you tried to precache doesn't have a .mdl extension. This error occurs when a section from csgoclassy.ini doesn't exists.")
}

formatex(buffcharsmax(buff), "You have a missing model ^"%s^" in the [DEFAULT] section of csgoclassy.ini"weaponmodel);

set_fail_state(buff); 
and

Code:
if (!file_exists(weaponmodel)) {         server_print("[CSGO Classy] You have a missing model ^"%s^" in the [SKINS] section of csgoclassy.ini", weaponmodel);         set_fail_state(""); }

to

PHP Code:
if (!file_exists(weaponmodel))
{
    
formatex(buffcharsmax(buff), "[CSGO Classy] You have a missing model ^"%s^" in the [SKINS] section of csgoclassy.ini"weaponmodel);

    
set_fail_state(buff);

__________________
mlibre is offline