zp_register_game_mode
Registers a custom game mode which will be added to the admin menu of ZP Note: The returned game mode ID can later be used to detect the game mode which is called in zp_round_started_pre. There you can start the game mode externally by using this game mode ID.
Syntax
native zp_register_game_mode( const name[], flags, chance, allow, dm_mode) /** * 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, ZP_TEAM_SURVIVOR, ZP_TEAM_ASSASSIN and ZP_TEAM_SNIPER * can be used to make an item available to Nemesis, * Survivors, Assassins and Snipers. * * @param name Caption to display on the menu. * @param cost Ammo packs to be deducted on purchase. * @param teams Bitsum of teams it should be available for. * @return An internal extra item ID, or -1 on failure. */ native zp_register_extra_item(const name[], cost, teams) /** * 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. * * @param name Caption to display on the menu. * @param info Brief description of the class. * @param model Player model to be used. * @param clawmodel Claws model to be used. * @param hp Initial health points.
Usage
| name | The game mode's name which will help in identifing it. |
| flags | Access flags required by the admins to start this game mode. |
| chance | Chance level of this game mode. (1 in X). |
| allow | Whether to permit infection after zombie to player attacks. |
| dm_mode | Death match mode which will be used during this game. |
Return
An — internal game mode ID or -1 on failure.
Defined in
zombie_plague_advance.inc
at line 515
.
This documentation was automatically generated from source.