Skip to content

Commit

Permalink
Adding native hclass count
Browse files Browse the repository at this point in the history
  • Loading branch information
PerfectScrash committed Feb 12, 2022
1 parent 821388a commit c380254
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,5 @@ Bombardier (From ZP Shade), Wesker (From Zombie Apocalipse), Spy and Dragon
- 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
- Added Directory Support on filenames
- Added Native: zp_get_hclass_count()
8 changes: 8 additions & 0 deletions addons/amxmodx/scripting/include/zombie_plague_special.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1595,6 +1595,14 @@ native zp_set_user_gravity(id, Float:Gravity);
*/
native zp_get_user_maxhealth(id);

/**
* Get total of instaled human classes
*
* @return Total of instaled hclasses
*/
native zp_get_hclass_count();


/***************************************************
-------------------- Forwards ----------------------
****************************************************/
Expand Down
3 changes: 3 additions & 0 deletions addons/amxmodx/scripting/zombie_plague_special_45.sma
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@
- On amx settings api:
- Expanded buffer size on filenames
- Added Directory Support on filenames
- Added Native: zp_get_hclass_count()

============================================================================================================================*/

Expand Down Expand Up @@ -1047,6 +1048,7 @@ public plugin_natives() {
register_native("zp_set_param_string", "native_set_fw_param_string");
register_native("zp_get_user_maxhealth", "native_get_user_maxhealth");
register_native("zp_register_start_gamemode_snd", "native_register_start_gamemode_snd");
register_native("zp_get_hclass_count", "native_get_hclass_count");

}
public plugin_precache() {
Expand Down Expand Up @@ -11123,6 +11125,7 @@ public native_reset_player_model(plugin_id, num_params) { // Native: zp_reset_pl
}
public native_get_extra_item_count(plugin_id, num_params) return g_extraitem_i; // Native: zp_get_extra_item_count
public native_get_zclass_count(plugin_id, num_params) return g_zclass_i; // Native: zp_get_zclass_count
public native_get_hclass_count(plugin_id, num_params) return g_hclass_i; // Native: zp_get_hclass_count
public native_get_gamemodes_count(plugin_id, num_params) return (g_gamemodes_i - MAX_GAME_MODES); // Native: zp_get_gamemodes_count
public native_get_custom_special_count(plugin_id, num_params) {
static zm; zm = get_param(1);
Expand Down

0 comments on commit c380254

Please sign in to comment.