native

zpsp_register_gamemode

Syntax

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");

Description

Registers a custom game mode which will be added to the admin menu of ZP

Parameters

name The game modes name which will also be used by other plugins to identify this game mode
flags Access flags required by the admins to start this game mode via the admin menu.
chance Chance level of this game mode. (1 in X) The higher the value the lesser the chance that this game mode will be called
allow Whether to permit infection or not after a zombie's attack
dm_mode Death match mode during this game. Use ZP_DM_NONE to disable respawning during this game mode
resp_limit Respawn Limit (Use 0 for unlimited respawn)
enable_in_ze Enable Game mode in zombie escape maps (0 - Disable | 1 - Enable)

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.

Return

An internal game mode ID or -1 on failure

Error

If Game mode name alterady exists