Skip to content

Commit

Permalink
Fixed some parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
PerfectScrash committed Feb 12, 2022
1 parent 8d5f89b commit 821388a
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 13 deletions.
16 changes: 14 additions & 2 deletions Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,24 @@ 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)
- Updated Native: zpsp_register_gamemode(const name[], flags, chance, allow, dm_mode, resp_limit=0, enable_in_ze=0, uselang=0, const langkey[]="ITEM_LANG_DEFAULT_KEY");
- 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"
- 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
5 changes: 5 additions & 0 deletions addons/amxmodx/configs/plugins-zplague.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
; ========================
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions addons/amxmodx/scripting/include/zpsp_stocks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
18 changes: 9 additions & 9 deletions addons/amxmodx/scripting/zombie_plague_special_45.sma
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 821388a

Please sign in to comment.