From 821388a351606c1a61a5e123f8fd0979ba0d6047 Mon Sep 17 00:00:00 2001 From: PerfectScrash Date: Fri, 11 Feb 2022 21:27:27 -0300 Subject: [PATCH] Fixed some parameters --- Readme.txt | 16 ++++++++++++++-- addons/amxmodx/configs/plugins-zplague.ini | 5 +++++ .../zombie_plague_special.cfg | 0 .../zombie_plague_special.ini | 0 .../{ => zpsp_configs}/zpsp_custom_weapons.ini | 0 .../{ => zpsp_configs}/zpsp_extraitems.ini | 0 .../{ => zpsp_configs}/zpsp_gamemodes.ini | 0 .../{ => zpsp_configs}/zpsp_humanclasses.ini | 0 .../zpsp_special_classes.ini | 0 .../{ => zpsp_configs}/zpsp_zombieclasses.ini | 0 .../amxmodx/scripting/include/zpsp_stocks.inc | 4 ++-- .../scripting/zombie_plague_special_45.sma | 18 +++++++++--------- 12 files changed, 30 insertions(+), 13 deletions(-) rename addons/amxmodx/configs/{ => zpsp_configs}/zombie_plague_special.cfg (100%) rename addons/amxmodx/configs/{ => zpsp_configs}/zombie_plague_special.ini (100%) rename addons/amxmodx/configs/{ => zpsp_configs}/zpsp_custom_weapons.ini (100%) rename addons/amxmodx/configs/{ => zpsp_configs}/zpsp_extraitems.ini (100%) rename addons/amxmodx/configs/{ => zpsp_configs}/zpsp_gamemodes.ini (100%) rename addons/amxmodx/configs/{ => zpsp_configs}/zpsp_humanclasses.ini (100%) rename addons/amxmodx/configs/{ => zpsp_configs}/zpsp_special_classes.ini (100%) rename addons/amxmodx/configs/{ => zpsp_configs}/zpsp_zombieclasses.ini (100%) diff --git a/Readme.txt b/Readme.txt index 9ef3079..2740f2b 100644 --- a/Readme.txt +++ b/Readme.txt @@ -281,7 +281,6 @@ Bombardier (From ZP Shade), Wesker (From Zombie Apocalipse), Spy and Dragon - Added Native: zp_menu_textadd(const text[]) - Updated Native: zp_register_weapon(const name[], wpn_type, uselang=0, const langkey[] = "ITEM_LANG_DEFAULT_KEY") - Added Cvar: zp_choose_hclass_instantanly - - Added "FLAGS" option in "zpsp_gamemodes.ini" and in "zpsp_special_classes.ini" - Improved "save_custonomization" system - Improved model/sound system for any external class - Updated Native: zp_disinfect_user(id, silent, attacker) @@ -289,4 +288,17 @@ Bombardier (From ZP Shade), Wesker (From Zombie Apocalipse), Spy and Dragon - Added Forward: zp_player_show_hud(id, target, SpHudType:hudtype); - Added Native: zp_add_hud_text(const text[]); - Added Native: zp_get_user_hud_type(id); - - Now all natives are using "style 0" \ No newline at end of file + - Now all natives are using "style 0" + - Added Native: zp_register_zclass_painsnd(classid, const sound[]) + - Added Native: zp_register_zclass_deathsnd(classid, const sound[]) + - Added Native: zp_register_zmspecial_deathsnd(classid, const sound[]) + - Added Native: zp_register_gamemode_ambience(gamemode, const sound[], Float:Duration, enable=1) + - Added Native: zp_get_user_default_gravity(id) + - Added Native: zp_set_user_gravity(id, Float:Gravity) + - Added Native: zp_set_param_string(const string[]) + - Added Native: zp_get_user_maxhealth(id) + - Added Native: zp_register_start_gamemode_snd(id, const sound[]) + - ZP main configs are now in a exclusive path (configs/zpsp_configs/...) + - On amx settings api: + - Expanded buffer size on filenames + - Added Directory Support on filenames \ No newline at end of file diff --git a/addons/amxmodx/configs/plugins-zplague.ini b/addons/amxmodx/configs/plugins-zplague.ini index 884872d..c220376 100644 --- a/addons/amxmodx/configs/plugins-zplague.ini +++ b/addons/amxmodx/configs/plugins-zplague.ini @@ -20,6 +20,11 @@ zpsp_special_class/zpsp_special_class_morpheus.amxx debug ; ======================== zpsp_zombie_class/zpsp_zombie_classes.amxx debug +; ======================== +; --> Human Classes +; ======================== +zpsp_human_classes/zpsp_human_classes.amxx debug + ; ======================== ; --> Game modes ; ======================== diff --git a/addons/amxmodx/configs/zombie_plague_special.cfg b/addons/amxmodx/configs/zpsp_configs/zombie_plague_special.cfg similarity index 100% rename from addons/amxmodx/configs/zombie_plague_special.cfg rename to addons/amxmodx/configs/zpsp_configs/zombie_plague_special.cfg diff --git a/addons/amxmodx/configs/zombie_plague_special.ini b/addons/amxmodx/configs/zpsp_configs/zombie_plague_special.ini similarity index 100% rename from addons/amxmodx/configs/zombie_plague_special.ini rename to addons/amxmodx/configs/zpsp_configs/zombie_plague_special.ini diff --git a/addons/amxmodx/configs/zpsp_custom_weapons.ini b/addons/amxmodx/configs/zpsp_configs/zpsp_custom_weapons.ini similarity index 100% rename from addons/amxmodx/configs/zpsp_custom_weapons.ini rename to addons/amxmodx/configs/zpsp_configs/zpsp_custom_weapons.ini diff --git a/addons/amxmodx/configs/zpsp_extraitems.ini b/addons/amxmodx/configs/zpsp_configs/zpsp_extraitems.ini similarity index 100% rename from addons/amxmodx/configs/zpsp_extraitems.ini rename to addons/amxmodx/configs/zpsp_configs/zpsp_extraitems.ini diff --git a/addons/amxmodx/configs/zpsp_gamemodes.ini b/addons/amxmodx/configs/zpsp_configs/zpsp_gamemodes.ini similarity index 100% rename from addons/amxmodx/configs/zpsp_gamemodes.ini rename to addons/amxmodx/configs/zpsp_configs/zpsp_gamemodes.ini diff --git a/addons/amxmodx/configs/zpsp_humanclasses.ini b/addons/amxmodx/configs/zpsp_configs/zpsp_humanclasses.ini similarity index 100% rename from addons/amxmodx/configs/zpsp_humanclasses.ini rename to addons/amxmodx/configs/zpsp_configs/zpsp_humanclasses.ini diff --git a/addons/amxmodx/configs/zpsp_special_classes.ini b/addons/amxmodx/configs/zpsp_configs/zpsp_special_classes.ini similarity index 100% rename from addons/amxmodx/configs/zpsp_special_classes.ini rename to addons/amxmodx/configs/zpsp_configs/zpsp_special_classes.ini diff --git a/addons/amxmodx/configs/zpsp_zombieclasses.ini b/addons/amxmodx/configs/zpsp_configs/zpsp_zombieclasses.ini similarity index 100% rename from addons/amxmodx/configs/zpsp_zombieclasses.ini rename to addons/amxmodx/configs/zpsp_configs/zpsp_zombieclasses.ini diff --git a/addons/amxmodx/scripting/include/zpsp_stocks.inc b/addons/amxmodx/scripting/include/zpsp_stocks.inc index b868024..d8542a1 100644 --- a/addons/amxmodx/scripting/include/zpsp_stocks.inc +++ b/addons/amxmodx/scripting/include/zpsp_stocks.inc @@ -62,7 +62,7 @@ stock zp_remove_user_infbomb(id) * @return True if sucess, false otherwise. */ stock zp_give_user_madness(id, Float:Duration = -1.0) - return zpsp_set_user_madness(id, 1, Duration); + return zp_set_user_madness(id, 1, Duration); /** * Remove user Zombie Madness @@ -71,7 +71,7 @@ stock zp_give_user_madness(id, Float:Duration = -1.0) * @return True if sucess, false otherwise. */ stock zp_remove_user_madness(id) - return zpsp_set_user_madness(id, 0); + return zp_set_user_madness(id, 0); /** * Returns whether the current round is a infection mode. diff --git a/addons/amxmodx/scripting/zombie_plague_special_45.sma b/addons/amxmodx/scripting/zombie_plague_special_45.sma index 7e97b7d..89e3167 100644 --- a/addons/amxmodx/scripting/zombie_plague_special_45.sma +++ b/addons/amxmodx/scripting/zombie_plague_special_45.sma @@ -326,6 +326,7 @@ new const ZP_CUSTOM_GM_FILE[] = "zpsp_configs/zpsp_gamemodes.ini"; new const ZP_SPECIAL_CLASSES_FILE[] = "zpsp_configs/zpsp_special_classes.ini"; new const ZP_WEAPONS_FILE[] = "zpsp_configs/zpsp_custom_weapons.ini"; new const ZP_HUMANCLASSES_FILE[] = "zpsp_configs/zpsp_humanclasses.ini" +new const ZP_CFG_FILE[] = "zpsp_configs/zombie_plague_special.cfg" // Limiters for stuff not worth making dynamic arrays out of (increase if needed) const MAX_CSDM_SPAWNS = 128; @@ -2149,7 +2150,7 @@ public plugin_cfg() { if(!g_pluginenabled) return; // Plugin disabled? static cfgdir[32]; get_configsdir(cfgdir, charsmax(cfgdir)) // Get configs dir - server_cmd("exec %s/zpsp_configs/zombie_plague_special.cfg", cfgdir) // Execute config file (zombie_plague_special.cfg) + server_cmd("exec %s/%s", cfgdir, ZP_CFG_FILE) // Execute .cfg config file g_arrays_created = false // Prevent any more stuff from registering @@ -10921,18 +10922,17 @@ public native_register_zclass_deathsnd(plugin_id, num_params) { public native_register_zmspecial_deathsnd(plugin_id, num_params) { static classid, sound[64]; classid = get_param(1); + if(classid < MAX_SPECIALS_ZOMBIES || classid >= g_zm_specials_i) { + log_error(AMX_ERR_NATIVE, "[ZP] Invalid Custom Special class id (%d)", classid) + return false; + } + get_string(2, sound, charsmax(sound)) - return register_zclass_sounds(1, classid, "DEATH SOUND", g_zm_sp_realname, g_zm_sp_use_deathsnd, g_zm_sp_deathsnd_handle, sound) + return register_zclass_sounds(1, classid-1, "DEATH SOUND", g_zm_sp_realname, g_zm_sp_use_deathsnd, g_zm_sp_deathsnd_handle, sound) } public register_zclass_sounds(is_sp, classid, key[], Array:realname, Array:enable_array, Array:handle_array, sound[]) { - if(is_sp) { - if(classid < MAX_SPECIALS_ZOMBIES || classid >= g_zm_specials_i) { - log_error(AMX_ERR_NATIVE, "[ZP] Invalid Custom Special class id (%d)", classid) - return false; - } - } - else { + if(!is_sp) { if (classid < 0 || classid >= g_zclass_i) { log_error(AMX_ERR_NATIVE, "[ZP] Invalid zombie class id (%d)", classid) return false;