Functions
zombieplague.inc
zombie plague 5.0
| Function | Type | Description |
|---|---|---|
| zp_extra_item_selected | forward | Called when a player buys an extra item from the ZP menu. Note: You can now return ZP_PLUGIN_HANDLED in your plugin to block the purchase and the player will be automatically refunded. |
| zp_round_ended | forward | Called when the round ends. |
| zp_round_started | forward | Called when the ZP round starts, i.e. first zombie is chosen or a game mode begins. |
| zp_user_humanize_attempt | forward | This function has no description. |
| zp_user_humanized_post | forward | This function has no description. |
| zp_user_humanized_pre | forward | Called when a player turns back to human. |
| zp_user_infect_attempt | forward | Called on a player infect/cure attempt. You can use this to block an infection/humanization by returning ZP_PLUGIN_HANDLED in your plugin. Note: Right now this is only available after the ZP round starts, since some situations (like blocking a first zombie's infection) are not yet handled. |
| zp_user_infected_post | forward | This function has no description. |
| zp_user_infected_pre | forward | Called when a player gets infected. |
| zp_user_last_human | forward | Called when a player becomes the last human. |
| zp_user_last_zombie | forward | Called when a player becomes the last zombie. Note: This is called for the first zombie too. |
| zp_user_unfrozen | forward | Called when a player gets unfrozen (frostnades). |
| zp_disinfect_user | native | Forces a player to become a human. Note: Unavailable for last zombie/nemesis. |
| zp_force_buy_extra_item | native | Forces a player to buy an extra item. |
| zp_get_extra_item_id | native | Returns an extra item's ID. |
| zp_get_human_count | native | Returns number of alive humans. |
| zp_get_nemesis_count | native | Returns number of alive nemesis. |
| zp_get_survivor_count | native | Returns number of alive survivors. |
| zp_get_user_ammo_packs | native | Returns a player's ammo pack count. |
| zp_get_user_batteries | native | Returns a player's custom flashlight batteries charge. |
| zp_get_user_first_zombie | native | Returns whether a player is the first zombie. |
| zp_get_user_last_human | native | Returns whether a player is the last human. |
| zp_get_user_last_zombie | native | Returns whether a player is the last zombie. |
| zp_get_user_nemesis | native | Returns whether a player is a nemesis. |
| zp_get_user_next_class | native | Returns a player's next zombie class ID (for the next infection). |
| zp_get_user_nightvision | native | Returns whether a player has night vision. |
| zp_get_user_survivor | native | Returns whether a player is a survivor. |
| zp_get_user_zombie | native | Returns whether a player is a zombie. |
| zp_get_user_zombie_class | native | Returns a player's current zombie class ID. |
| zp_get_zombie_class_id | native | Returns a zombie class' ID. |
| zp_get_zombie_class_info | native | Returns a zombie class' description (passed by reference). |
| zp_get_zombie_count | native | Returns number of alive zombies. |
| zp_get_zombie_maxhealth | native | Returns the default maximum health of a zombie. Note: Takes into account first zombie's HP multiplier. |
| zp_has_round_started | native | Returns whether the ZP round has started, i.e. first zombie has been chosen or a game mode has begun. |
| zp_infect_user | native | Forces a player to become a zombie. Note: Unavailable for last human/survivor. |
| zp_is_nemesis_round | native | Returns whether the current round is a nemesis round. |
| zp_is_plague_round | native | Returns whether the current round is a plague round. |
| zp_is_survivor_round | native | Returns whether the current round is a survivor round. |
| zp_is_swarm_round | native | Returns whether the current round is a swarm round. |
| zp_make_user_nemesis | native | Forces a player to become a nemesis. Note: Unavailable for last human/survivor. |
| zp_make_user_survivor | native | Forces a player to become a survivor. Note: Unavailable for last zombie/nemesis. |
| zp_override_user_model | native | Overrides ZP player model with a different custom model. Note: This will last until player's next infection/humanization/respawn. Note: Don't call more often than absolutely needed. |
| zp_register_extra_item | native | Registers a custom item which will be added to the extra items menu of ZP. Note: The returned extra item ID can be later used to catch item purchase events for the zp_extra_item_selected() forward. Note: ZP_TEAM_NEMESIS and ZP_TEAM_SURVIVOR can be used to make an item available to Nemesis and Survivors respectively. |
| zp_register_zombie_class | native | Registers a custom class which will be added to the zombie classes menu of ZP. Note: The returned zombie class ID can be later used to identify the class when calling the zp_get_user_zombie_class() natives. |
| zp_respawn_user | native | Respawns a player into a specific team. |
| zp_set_user_ammo_packs | native | Sets a player's ammo pack count. |
| zp_set_user_batteries | native | Sets a player's custom flashlight batteries charge. |
| zp_set_user_nightvision | native | Sets whether a player has night vision. |
| zp_set_user_zombie_class | native | Sets a player's next zombie class ID (for the next infection). |