Premium Реклама Spotlight Bundles Boost Банери Кредити
Основно Начало Сървъри Marketplace Форум Сървъри
Общности Хостинг Добави Auction Boost
Ресурси
Библиотеки Карти Видеа Магазин Bundles
Инструменти
Builder Demo CFG HUD
AMXX API
Вход Регистрация
TOP SERVER
[IG] Easy Surf | Ramp Fix | RANKS | REPLAYS
Counter-Strike 1.6
surf_flyin_fortress
40.160.19.36:27015
18.05 18:49
8/64
186ms
/ Библиотеки / zp50_gamemodes.inc

zp50_gamemodes.inc

.inc 3.6 KB 138 реда 04.04.2026
Pawn / AMX Mod X
#if defined _zp50_gamemodes_included
  #endinput
#endif
#define _zp50_gamemodes_included

#include <zp50_core>
#include <zp50_gamemodes_const>

#if AMXX_VERSION_NUM >= 175
	#pragma reqlib zp50_gamemodes
	#if !defined AMXMODX_NOAUTOLOAD
		#pragma loadlib zp50_gamemodes
	#endif
#else
	#pragma library zp50_gamemodes
#endif


/**
 * Registers a new game mode.
 *
 * @param name		Game mode name.
 * @return			An internal game mode ID, or ZP_INVALID_GAME_MODE on failure.
 */
native zp_gamemodes_register(const name[])

/**
 * Sets a default game mode (to start if no other game mode can been started).
 *
 * @param game_mode_id		A valid game mode ID.
 * @return					True on success, false otherwise.
 */
native zp_gamemodes_set_default(game_mode_id)

/**
 * Returns default game mode.
 *
 * @return					A valid game mode ID.
 */
native zp_gamemodes_get_default()

/**
 * Returns game mode that was chosen for the current round.
 *
 * @return			An internal game mode ID, or ZP_NO_GAME_MODE.
 */
native zp_gamemodes_get_chosen()

/**
 * Returns game mode that is currently in progress.
 *
 * @return			An internal game mode ID, or ZP_NO_GAME_MODE.
 */
native zp_gamemodes_get_current()

/**
 * Returns a game mode's ID.
 *
 * @param name		Game mode name to look for.
 * @return			Internal game mode ID, or ZP_INVALID_GAME_MODE if not found.
 */
native zp_gamemodes_get_id(const name[])

/**
 * Returns a game mode's name.
 *
 * @param game_mode_id	A valid game mode ID.
 * @param name			The buffer to store the string in.
 * @param len			Character size of the output buffer.
 * @return				True on success, false otherwise.
 */
native zp_gamemodes_get_name(game_mode_id, name[], len)

/**
 * Forces a game mode to start.
 *
 * @param game_mode_id		A valid game mode ID.
 * @param target_player		Player ID to be passed to game mode (optional).
 * @return					True on success, false if game mode can't start.
 */
native zp_gamemodes_start(game_mode_id, target_player = RANDOM_TARGET_PLAYER)

/**
 * Returns number of registered game modes.
 *
 * @return			Game mode count.
 */
native zp_gamemodes_get_count()

/**
 * Sets whether zombies can infect humans for the current game mode.
 *
 * @param allow			True to allow, false otherwise.
 */
native zp_gamemodes_set_allow_infect(allow = true)

/**
 * Returns whether zombies are allowed to infect humans for the current game mode.
 *
 * @return			True if allowed, false otherwise.
 */
native zp_gamemodes_get_allow_infect()

/**
 * Called when ZP tries to choose a game mode for the current
 * round. Returning PLUGIN_HANDLED here will tell the game modes
 * manager that your mode can't be chosen (useful to set custom
 * conditions, like a min amount of players, etc.)
 *
 * @param game_mode_id		Internal game mode ID.
 * @param skipchecks		True when mode is being started by an admin.
 */
forward zp_fw_gamemodes_choose_pre(game_mode_id, skipchecks)

/**
 * Called when a game mode is chosen for the current round.
 *
 * @param game_mode_id		Internal ID for the game mode that was chosen.
 * @param target_player		Player ID passed to game mode (can be RANDOM_TARGET_PLAYER).
 */
forward zp_fw_gamemodes_choose_post(game_mode_id, target_player)

/**
 * Called when a game mode starts.
 *
 * @param game_mode_id		Internal ID for the game mode that was started.
 */
forward zp_fw_gamemodes_start(game_mode_id)

/**
 * Called when a game mode ends.
 *
 * Note: this can pass ZP_NO_GAME_MODE (if no game mode was in progress).
 *
 * @param game_mode_id		Internal ID for the game mode that ended.
 */
forward zp_fw_gamemodes_end(game_mode_id)
РЕКЛАМИРАЙ ПРИ НАС!
AMXX-BG.INFO
КАК ДА ИЗПОЛЗВАМ
Добави в началото на .sma файла:
#include <zp50_gamemodes>
1. Изтегли
Свали файла от бутона по-горе
2. Копирай
Постави в scripting/include/
3. Включи
Добави #include директивата
4. Компилирай
Използвай amxxpc или scripting/compile.exe
PrivateServ.NET