Game Commencing

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
72
Реакции
10
Привет. Пытаюсь отловить game commencing и предовратить его:
Код:
#include <amxmodx>
#include <reapi>

#define PLUGIN  "Plugin"
#define VERSION "1.0"
#define AUTHOR  "Nunfy"

#define con             console_print
#define cp                 client_print
#define cpc             client_print_color
#define sc                 server_cmd
#define register_menu(%0,%1,%2) register_menucmd(register_menuid(%0), %1, %2)

new HookChain: hook_chain_round_end;

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);

    EnableHookChain(hook_chain_round_end = RegisterHookChain(RG_RoundEnd, "round_end", false));
}

//---[Хуки]
public round_end(WinStatus:status, ScenarioEventEndRound:event, Float:tmDelay)
{
    switch(event)
    {
        case ROUND_GAME_COMMENCE:
        {
            set_member_game(m_bGameStarted, true);
            SetHookChainReturn(ATYPE_INTEGER, false);
            return HC_SUPERCEDE;
        }
    }
    return HC_CONTINUE;
}
Game Commencing все равно срабатывает, в чем приблема?
Код:
// The style of gameplay where there aren't any teams (FFA mode)
// 0 - disabled (default behaviour)
// 1 - enabled
//
// Default value: "0"
mp_freeforall 0

// Auto balancing of teams
// 0 - disabled
// 1 - on after next round (default behaviour)
// 2 - on next round
//
// Default value: "1"
mp_autoteambalance 0

// Designate the desired amount of buy time for each round. (in minutes)
// -1 - means no time limit
//  0 - disable buy
//
// Default value: "1.5"
mp_buytime 0

// The maximum allowable amount of money in the game
//
// Default value: "16000"
mp_maxmoney 16000

// Disable round end by game scenario
// 0 - disabled (default behaviour)
// 1 - enabled (never end round)
//
// Flags for fine grained control (choose as many as needed)
// a - block round time round end check
// b - block needed players round end check
// c - block VIP assassination/success round end check
// d - block prison escape round end check
// e - block bomb round end check
// f - block team extermination round end check
// g - block hostage rescue round end check
//
// Example setting: "ae" - blocks round time and bomb round end checks
// Default value: "0"
mp_round_infinite 0

// The round by expired time will be over, if on a map it does not have the scenario of the game.
// 0 - disabled (default behaviour)
// 1 - enabled
// Default value: "0"
mp_roundover 0

// Number of seconds to delay before restarting a round after a win.
// Default value: "5"
mp_round_restart_delay 5

// Disable grenade damage through walls
// 0 - disabled
// 1 - enabled
// Default value: "0"
mp_hegrenade_penetration 0

// Drop a grenade after player death
// 0 - disabled
// 1 - drop one the grenade
// 2 - drop an everyone grenades
// Default value: "0"
mp_nadedrops 0

// Player cannot respawn until next round
// if more than N seconds has elapsed since the beginning round
//
// Default value: "20"
mp_roundrespawn_time 20

// Automatically reload each weapon on player spawn
// 0 - disabled (default behaviour)
// 1 - enabled
//
// Default value: "0"
mp_auto_reload_weapons "0"

// Refill amount of backpack ammo up to the max
// 0 - disabled (default behaviour)
// 1 - refill backpack ammo on player spawn
// 2 - refill backpack ammo on player spawn and on the purchase of the item
// 3 - refill backpack ammo on each weapon reload (NOTE: Useful for mods like DeathMatch, GunGame, ZombieMod etc.)
//
// Default value: "0"
mp_refill_bpammo_weapons 0

// Automatically joins the team
// 0 - disabled
// 1 - enabled (Use in conjunction with the cvar humans_join_team any/SPEC/CT/T)
//
// Default value: "0"
mp_auto_join_team 0

humans_join_team SPEC

// Maximum number of allowed teamkills before autokick.
// Used when enabled mp_autokick.
// 0 - disabled
//
// Default value: "3"
mp_max_teamkills 0

// If set to something other than 0,
// when anybody’s scored reaches mp_fraglimit the server changes map.
// 0 - means no limit
//
// Default value: "0"
mp_fraglimit 0

// Period between map rotations.
// 0 - means no limit
//
// Default value: "0"
mp_timelimit 0

// Players will automatically respawn when killed.
// 0  - disabled
// >0.00001 - time delay to respawn
//
// Default value: "0"
mp_forcerespawn 0

// The hostages can take damage.
// 0 - disabled
// 1 - from any team (default behaviour)
// 2 - only from CT
// 3 - only from T
mp_hostage_hurtable 1

// Show radio icon.
// 0 - disabled
// 1 - enabled (default behavior)
mp_show_radioicon 1

// Play "Bomb has been defused" sound instead of "Counter-Terrorists win" when bomb was defused
// 0 - disabled (default behavior)
// 1 - enabled
//
// Default value: "1"
mp_old_bomb_defused_sound 1

// Set's the mode for the zBot
// 0 - disabled
// 1 - enable mode Deathmatch and not allow to do the scenario
//
// Default value: "0"
bot_deathmatch 0

// Determines the type of quota.
// normal - default behaviour
// fill   - the server will adjust bots to keep N players in the game, where N is bot_quota
//
// Default value: "normal"
bot_quota_mode "normal"

// Debug cvar shows triggers.
// 0 - disabled (default behaviour)
// 1 - enabled
//
// Default value: "0"
showtriggers 0

// When players can hear each other.
// Further explanation: https://github.com/s1lentq/ReGameDLL_CS/wiki/sv_alltalk
// 0 - dead don't hear alive
// 1 - no restrictions
// 2 - teammates hear each other
// 3 - same as 2, but spectators hear everybody
// 4 - alive hear alive, dead hear dead and alive.
//
// Default value: "0"
sv_alltalk 1

// Time to remove item that have been dropped from the players. (in seconds)
//
// Default value: "300"
mp_item_staytime 300

// Legacy func_bomb_target touch. New one is more strict.
// 0 - New behavior
// 1 - Legacy behavior
//
// Default value: "1"
mp_legacy_bombtarget_touch "1"

// Specifies the players defense time after respawn. (in seconds).
// 0 - disabled
// >0.00001 - time delay to remove protection
//
// Default value: "0"
mp_respawn_immunitytime "0"
31 Окт 2018
То чуство когда не расскоментировал плагин в plugins.ini - :wacko:
Извините, тему можно закрыть
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу