/* * _______ _ _ __ __ * | _____/ | | | | \ \ __ / / * | | | | | | | | / \ | | * | | | |____| | | |/ __ \| | * | | ___ | ______ | | / \ | * | | |_ | | | | | | / \ | * | | | | | | | | | | | | * | |____| | | | | | | | | | * |_______/ |_| |_| \_/ \_/ * * * * Last Edited: 06-12-08 * * ============ * Changelog: * ============ * * v1.3 * -Bug Fixes * * v1.0 * -Initial Release * */ #define VERSION "1.3" #include #include #include #define MAX_SOUNDS 50 #define MAX_p_MODELS 50 #define MAX_v_MODELS 50 #define MAX_w_MODELS 50 #define MAP_CONFIGS 1 new new_sounds[MAX_SOUNDS][48] new old_sounds[MAX_SOUNDS][48] new sounds_team[MAX_SOUNDS] new soundsnum new new_p_models[MAX_p_MODELS][48] new old_p_models[MAX_p_MODELS][48] new p_models_team[MAX_p_MODELS] new p_modelsnum new new_v_models[MAX_v_MODELS][48] new old_v_models[MAX_v_MODELS][48] new v_models_team[MAX_p_MODELS] new v_modelsnum new new_w_models[MAX_w_MODELS][48] new old_w_models[MAX_w_MODELS][48] new w_models_team[MAX_p_MODELS] new w_modelsnum new maxplayers public plugin_init() { register_plugin("Weapon Model + Sound Replacement",VERSION,"GHW_Chronic") register_forward(FM_EmitSound,"Sound_Hook") register_forward(FM_SetModel,"W_Model_Hook",1) register_logevent("newround",2,"1=Round_Start") register_event("CurWeapon","Changeweapon_Hook","be","1=1") maxplayers = get_maxplayers() } public plugin_precache() { new configfile[200] new configsdir[200] new map[32] get_configsdir(configsdir,199) get_mapname(map,31) format(configfile,199,"%s/new_weapons_%s.ini",configsdir,map) if(file_exists(configfile)) { load_models(configfile) } else { format(configfile,199,"%s/new_weapons.ini",configsdir) load_models(configfile) } } public load_models(configfile[]) { if(file_exists(configfile)) { new read[96], left[48], right[48], right2[32], trash, team for(new i=0;i