Как да махна времето за игра в картата

Въпроси и проблеми свързани с AMXModX.
Заключена
Потребителски аватар

Автор на темата
Manqkabgbe
Потребител
Потребител
Мнения: 6
Регистриран: 08 ное 2019, 09:23
Местоположение: София
Се отблагодари: 3 пъти
Години: 19
Контакти:

Как да махна времето за игра в картата

Мнение от Manqkabgbe » 08 ное 2019, 12:46

Здравейте искам да махна Round Time от картата си Timeleft-a съм го направил на 0
Но проблема ми е с времето където ви е по средата долу при мен в слуая е 1 мин.


Ето и game.cfg
// ReGameDLL Configuration File
echo Executing ReGameDLL Configuration File

// 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 1

// 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: "ae"
mp_round_infinite "1"

// 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: "0"
mp_round_restart_delay 0

// 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: "0"
mp_roundrespawn_time 0

// 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 1

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

// 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 0

// 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"

// Kill the player in filled spawn before spawning some one else (Prevents players stucking in each other).
// Only disable this if you have semiclip or other plugins that prevents stucking
// 0 - disabled
// 1 - enabled
//
// Default value: "1"
mp_kill_filled_spawn "1"

Потребителски аватар

Just CS-UG
Потребител
Потребител
Мнения: 264
Регистриран: 23 дек 2016, 19:10
Местоположение: http://cs-ultragaming.info
Се отблагодари: 4 пъти
Получена благодарност: 9 пъти
Контакти:

Как да махна времето за игра в картата

Мнение от Just CS-UG » 08 ное 2019, 17:33

Влизаш в server.cfg и намираш mp_roundtime правиш го на 0 другият път ползваи за тези кодове от sma/.cfg и т.н
Изображение
Connect 93.123.18.5:27017
Connect 93.123.18.6:27015

Потребителски аватар

Автор на темата
Manqkabgbe
Потребител
Потребител
Мнения: 6
Регистриран: 08 ное 2019, 09:23
Местоположение: София
Се отблагодари: 3 пъти
Години: 19
Контакти:

Как да махна времето за игра в картата

Мнение от Manqkabgbe » 08 ное 2019, 18:07

Just написа:
08 ное 2019, 17:33
Влизаш в server.cfg и намираш mp_roundtime правиш го на 0 другият път ползваи за тези кодове от sma/.cfg и т.н
Ето ти server.cfg
// Use this file to configure your DEDICATED server.
// This config file is executed on server start.

// disable autoaim
sv_aim 0

// disable clients' ability to pause the server
pausable 0

// default server name. Change to "Bob's Server", etc.
hostname "Extreme18+Respawn"

// maximum client movement speed
sv_maxspeed 320

// 0 minute timelimit
mp_timelimit 0

sv_cheats 0

// load ban files
exec listip.cfg
exec banned.cfg

Потребителски аватар

JackEyedJones
Потребител
Потребител
Мнения: 263
Регистриран: 10 сеп 2018, 17:26
Местоположение: Plovdiv, Bulgaria, Europe, Entire World
Се отблагодари: 4 пъти
Получена благодарност: 46 пъти
Години: 26
Контакти:

Как да махна времето за игра в картата

Мнение от JackEyedJones » 08 ное 2019, 18:14

Код: Избери всички

/* AMX Mod X
*   No Objectives
*
* (c) Copyright 2007 by VEN
*
* This file is provided as is (no warranties)
*
*	DESCRIPTION
*		Plugin allow to remove all map objectives or objectives of certain type.
*		Round timer will be disbled for maps that doesn't contain any objectives.
*
*	CVARS
*		no_objectives (flags: acde, default: acde, "": disable the plugin)
*			a - remove "as" (vip assasination) objectives
*			c - remove "cs" (hostage rescue) objectives
*			d - remove "de" (bomb defuse) objectives
*			e - remove "es" (T escape) objectives
*		Note: map change on CVar change required.
*
*	VERSIONS
*		0.3
*			- added support for all objective entities
*			- fixed: timer wasn't shown on multi objective maps if objectives wasn't completely removed
*			- improvements in objective modes routine
*		0.2
*			- disabled round timer
*			- added no_objectives CVar
*		0.1
*			- initial version
*/

// plugin's main information
#define PLUGIN_NAME "No Objectives"
#define PLUGIN_VERSION "0.3"
#define PLUGIN_AUTHOR "VEN"

#include <amxmodx>
#include <fakemeta>

new const g_objective_ents[][] = 
{
	"func_bomb_target",
	"info_bomb_target",
	"hostage_entity",
	"monster_scientist",
	"func_hostage_rescue",
	"info_hostage_rescue",
	"info_vip_start",
	"func_vip_safetyzone",
	"func_escapezone"
}

#define OBJTYPE_AS (1<<0)
#define OBJTYPE_CS (1<<2)
#define OBJTYPE_DE (1<<3)
#define OBJTYPE_ES (1<<4)
#define OBJTYPE_ALL (OBJTYPE_AS | OBJTYPE_CS | OBJTYPE_DE | OBJTYPE_ES)

#define CVAR_NAME "no_objectives"
#define CVAR_DEFAULT OBJTYPE_ALL

new const g_objective_type[] = {
	OBJTYPE_DE,
	OBJTYPE_DE,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_AS,
	OBJTYPE_AS,
	OBJTYPE_ES
}

new const bool:g_objective_prim[] = {
	true,
	true,
	true,
	false,
	false,
	false,
	false,
	true,
	true
}

#define HIDE_ROUND_TIMER (1<<4)

new g_msgid_hideweapon

new g_pcvar_no_objectives

new g_no_objectives = CVAR_DEFAULT & OBJTYPE_ALL

public plugin_precache() {
	if ((g_pcvar_no_objectives = get_cvar_pointer(CVAR_NAME))) {
		new cvar_val[8]
		get_pcvar_string(g_pcvar_no_objectives, cvar_val, sizeof cvar_val - 1)
		g_no_objectives = read_flags(cvar_val) & OBJTYPE_ALL
	}

	if (g_no_objectives)
		register_forward(FM_Spawn, "forward_spawn")
}

public plugin_init() {
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

	if (!g_pcvar_no_objectives) {
		new cvar_defval[8]
		get_flags(CVAR_DEFAULT, cvar_defval, sizeof cvar_defval - 1)
		register_cvar(CVAR_NAME, cvar_defval)
	}

	if (is_objective_map())
		return

	g_msgid_hideweapon = get_user_msgid("HideWeapon")
	register_message(g_msgid_hideweapon, "message_hide_weapon")
	register_event("ResetHUD", "event_hud_reset", "b")
	set_msg_block(get_user_msgid("RoundTime"), BLOCK_SET)
}

public forward_spawn(ent) {
	if (!pev_valid(ent))
		return FMRES_IGNORED

	static classname[32], i
	pev(ent, pev_classname, classname, sizeof classname - 1)
	for (i = 0; i < sizeof g_objective_ents; ++i) {
		if (equal(classname, g_objective_ents[i])) {
			if (!(g_no_objectives & g_objective_type[i]))
				return FMRES_IGNORED

			engfunc(EngFunc_RemoveEntity, ent)
			return FMRES_SUPERCEDE
		}
	}

	return FMRES_IGNORED
}

public message_hide_weapon() {
	set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(1) | HIDE_ROUND_TIMER)
}

public event_hud_reset(id) {
	message_begin(MSG_ONE, g_msgid_hideweapon, _, id)
	write_byte(HIDE_ROUND_TIMER)
	message_end()
}

bool:is_objective_map() {
	new const classname[] = "classname"
	for (new i = 0; i < sizeof g_objective_ents; ++i) {
		if (g_objective_prim[i] && engfunc(EngFunc_FindEntityByString, FM_NULLENT, classname, g_objective_ents[i]))
			return true
	}

	return false
}
:dtm:

Потребителски аватар

Автор на темата
Manqkabgbe
Потребител
Потребител
Мнения: 6
Регистриран: 08 ное 2019, 09:23
Местоположение: София
Се отблагодари: 3 пъти
Години: 19
Контакти:

Как да махна времето за игра в картата

Мнение от Manqkabgbe » 08 ное 2019, 18:19

JackEyedJones написа:
08 ное 2019, 18:14

Код: Избери всички

/* AMX Mod X
*   No Objectives
*
* (c) Copyright 2007 by VEN
*
* This file is provided as is (no warranties)
*
*	DESCRIPTION
*		Plugin allow to remove all map objectives or objectives of certain type.
*		Round timer will be disbled for maps that doesn't contain any objectives.
*
*	CVARS
*		no_objectives (flags: acde, default: acde, "": disable the plugin)
*			a - remove "as" (vip assasination) objectives
*			c - remove "cs" (hostage rescue) objectives
*			d - remove "de" (bomb defuse) objectives
*			e - remove "es" (T escape) objectives
*		Note: map change on CVar change required.
*
*	VERSIONS
*		0.3
*			- added support for all objective entities
*			- fixed: timer wasn't shown on multi objective maps if objectives wasn't completely removed
*			- improvements in objective modes routine
*		0.2
*			- disabled round timer
*			- added no_objectives CVar
*		0.1
*			- initial version
*/

// plugin's main information
#define PLUGIN_NAME "No Objectives"
#define PLUGIN_VERSION "0.3"
#define PLUGIN_AUTHOR "VEN"

#include <amxmodx>
#include <fakemeta>

new const g_objective_ents[][] = 
{
	"func_bomb_target",
	"info_bomb_target",
	"hostage_entity",
	"monster_scientist",
	"func_hostage_rescue",
	"info_hostage_rescue",
	"info_vip_start",
	"func_vip_safetyzone",
	"func_escapezone"
}

#define OBJTYPE_AS (1<<0)
#define OBJTYPE_CS (1<<2)
#define OBJTYPE_DE (1<<3)
#define OBJTYPE_ES (1<<4)
#define OBJTYPE_ALL (OBJTYPE_AS | OBJTYPE_CS | OBJTYPE_DE | OBJTYPE_ES)

#define CVAR_NAME "no_objectives"
#define CVAR_DEFAULT OBJTYPE_ALL

new const g_objective_type[] = {
	OBJTYPE_DE,
	OBJTYPE_DE,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_AS,
	OBJTYPE_AS,
	OBJTYPE_ES
}

new const bool:g_objective_prim[] = {
	true,
	true,
	true,
	false,
	false,
	false,
	false,
	true,
	true
}

#define HIDE_ROUND_TIMER (1<<4)

new g_msgid_hideweapon

new g_pcvar_no_objectives

new g_no_objectives = CVAR_DEFAULT & OBJTYPE_ALL

public plugin_precache() {
	if ((g_pcvar_no_objectives = get_cvar_pointer(CVAR_NAME))) {
		new cvar_val[8]
		get_pcvar_string(g_pcvar_no_objectives, cvar_val, sizeof cvar_val - 1)
		g_no_objectives = read_flags(cvar_val) & OBJTYPE_ALL
	}

	if (g_no_objectives)
		register_forward(FM_Spawn, "forward_spawn")
}

public plugin_init() {
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

	if (!g_pcvar_no_objectives) {
		new cvar_defval[8]
		get_flags(CVAR_DEFAULT, cvar_defval, sizeof cvar_defval - 1)
		register_cvar(CVAR_NAME, cvar_defval)
	}

	if (is_objective_map())
		return

	g_msgid_hideweapon = get_user_msgid("HideWeapon")
	register_message(g_msgid_hideweapon, "message_hide_weapon")
	register_event("ResetHUD", "event_hud_reset", "b")
	set_msg_block(get_user_msgid("RoundTime"), BLOCK_SET)
}

public forward_spawn(ent) {
	if (!pev_valid(ent))
		return FMRES_IGNORED

	static classname[32], i
	pev(ent, pev_classname, classname, sizeof classname - 1)
	for (i = 0; i < sizeof g_objective_ents; ++i) {
		if (equal(classname, g_objective_ents[i])) {
			if (!(g_no_objectives & g_objective_type[i]))
				return FMRES_IGNORED

			engfunc(EngFunc_RemoveEntity, ent)
			return FMRES_SUPERCEDE
		}
	}

	return FMRES_IGNORED
}

public message_hide_weapon() {
	set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(1) | HIDE_ROUND_TIMER)
}

public event_hud_reset(id) {
	message_begin(MSG_ONE, g_msgid_hideweapon, _, id)
	write_byte(HIDE_ROUND_TIMER)
	message_end()
}

bool:is_objective_map() {
	new const classname[] = "classname"
	for (new i = 0; i < sizeof g_objective_ents; ++i) {
		if (g_objective_prim[i] && engfunc(EngFunc_FindEntityByString, FM_NULLENT, classname, g_objective_ents[i]))
			return true
	}

	return false
}
:dtm:
Само ако може да ми кажеш какво да го правя този код :confused: Тръгнах да го комплирам не стана

Потребителски аватар

JackEyedJones
Потребител
Потребител
Мнения: 263
Регистриран: 10 сеп 2018, 17:26
Местоположение: Plovdiv, Bulgaria, Europe, Entire World
Се отблагодари: 4 пъти
Получена благодарност: 46 пъти
Години: 26
Контакти:

Как да махна времето за игра в картата

Мнение от JackEyedJones » 08 ное 2019, 18:20

Нямам наличен компилатор за да го проверя. Прикачи снимка да видим какво трябва да се направи и какво прави проблем.
Последна промяна от JackEyedJones на 08 ное 2019, 18:27, променено общо 1 път.

Потребителски аватар

Autumn Shade EA\DICE
Developer
Developer
Мнения: 226
Регистриран: 14 мар 2019, 13:20
Се отблагодари: 44 пъти
Получена благодарност: 132 пъти

Как да махна времето за игра в картата

Мнение от Autumn Shade EA\DICE » 08 ное 2019, 18:22

Manqkabgbe написа:
08 ное 2019, 18:19
JackEyedJones написа:
08 ное 2019, 18:14

Код: Избери всички

/* AMX Mod X
*   No Objectives
*
* (c) Copyright 2007 by VEN
*
* This file is provided as is (no warranties)
*
*	DESCRIPTION
*		Plugin allow to remove all map objectives or objectives of certain type.
*		Round timer will be disbled for maps that doesn't contain any objectives.
*
*	CVARS
*		no_objectives (flags: acde, default: acde, "": disable the plugin)
*			a - remove "as" (vip assasination) objectives
*			c - remove "cs" (hostage rescue) objectives
*			d - remove "de" (bomb defuse) objectives
*			e - remove "es" (T escape) objectives
*		Note: map change on CVar change required.
*
*	VERSIONS
*		0.3
*			- added support for all objective entities
*			- fixed: timer wasn't shown on multi objective maps if objectives wasn't completely removed
*			- improvements in objective modes routine
*		0.2
*			- disabled round timer
*			- added no_objectives CVar
*		0.1
*			- initial version
*/

// plugin's main information
#define PLUGIN_NAME "No Objectives"
#define PLUGIN_VERSION "0.3"
#define PLUGIN_AUTHOR "VEN"

#include <amxmodx>
#include <fakemeta>

new const g_objective_ents[][] = 
{
	"func_bomb_target",
	"info_bomb_target",
	"hostage_entity",
	"monster_scientist",
	"func_hostage_rescue",
	"info_hostage_rescue",
	"info_vip_start",
	"func_vip_safetyzone",
	"func_escapezone"
}

#define OBJTYPE_AS (1<<0)
#define OBJTYPE_CS (1<<2)
#define OBJTYPE_DE (1<<3)
#define OBJTYPE_ES (1<<4)
#define OBJTYPE_ALL (OBJTYPE_AS | OBJTYPE_CS | OBJTYPE_DE | OBJTYPE_ES)

#define CVAR_NAME "no_objectives"
#define CVAR_DEFAULT OBJTYPE_ALL

new const g_objective_type[] = {
	OBJTYPE_DE,
	OBJTYPE_DE,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_AS,
	OBJTYPE_AS,
	OBJTYPE_ES
}

new const bool:g_objective_prim[] = {
	true,
	true,
	true,
	false,
	false,
	false,
	false,
	true,
	true
}

#define HIDE_ROUND_TIMER (1<<4)

new g_msgid_hideweapon

new g_pcvar_no_objectives

new g_no_objectives = CVAR_DEFAULT & OBJTYPE_ALL

public plugin_precache() {
	if ((g_pcvar_no_objectives = get_cvar_pointer(CVAR_NAME))) {
		new cvar_val[8]
		get_pcvar_string(g_pcvar_no_objectives, cvar_val, sizeof cvar_val - 1)
		g_no_objectives = read_flags(cvar_val) & OBJTYPE_ALL
	}

	if (g_no_objectives)
		register_forward(FM_Spawn, "forward_spawn")
}

public plugin_init() {
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

	if (!g_pcvar_no_objectives) {
		new cvar_defval[8]
		get_flags(CVAR_DEFAULT, cvar_defval, sizeof cvar_defval - 1)
		register_cvar(CVAR_NAME, cvar_defval)
	}

	if (is_objective_map())
		return

	g_msgid_hideweapon = get_user_msgid("HideWeapon")
	register_message(g_msgid_hideweapon, "message_hide_weapon")
	register_event("ResetHUD", "event_hud_reset", "b")
	set_msg_block(get_user_msgid("RoundTime"), BLOCK_SET)
}

public forward_spawn(ent) {
	if (!pev_valid(ent))
		return FMRES_IGNORED

	static classname[32], i
	pev(ent, pev_classname, classname, sizeof classname - 1)
	for (i = 0; i < sizeof g_objective_ents; ++i) {
		if (equal(classname, g_objective_ents[i])) {
			if (!(g_no_objectives & g_objective_type[i]))
				return FMRES_IGNORED

			engfunc(EngFunc_RemoveEntity, ent)
			return FMRES_SUPERCEDE
		}
	}

	return FMRES_IGNORED
}

public message_hide_weapon() {
	set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(1) | HIDE_ROUND_TIMER)
}

public event_hud_reset(id) {
	message_begin(MSG_ONE, g_msgid_hideweapon, _, id)
	write_byte(HIDE_ROUND_TIMER)
	message_end()
}

bool:is_objective_map() {
	new const classname[] = "classname"
	for (new i = 0; i < sizeof g_objective_ents; ++i) {
		if (g_objective_prim[i] && engfunc(EngFunc_FindEntityByString, FM_NULLENT, classname, g_objective_ents[i]))
			return true
	}

	return false
}
:dtm:
Само ако може да ми кажеш какво да го правя този код :confused: Тръгнах да го комплирам не стана
Нема ядове, тука сме се събрали екип от пророци и гадатели. Прилагаме черна магия, за да предскажем какви са грешките по кода на твоята невероятно анонимна и незнайна чудесия, наречена платформа. :coolface:

Потребителски аватар

Автор на темата
Manqkabgbe
Потребител
Потребител
Мнения: 6
Регистриран: 08 ное 2019, 09:23
Местоположение: София
Се отблагодари: 3 пъти
Години: 19
Контакти:

Как да махна времето за игра в картата

Мнение от Manqkabgbe » 08 ное 2019, 18:47

JackEyedJones написа:
08 ное 2019, 18:20
Нямам наличен компилатор за да го проверя. Прикачи снимка да видим какво трябва да се направи и какво прави проблем.
Нищо не пише дори не прави опит за комплиране използвам онлайн комплиматор

Добавено преди 14 минути 30 секунди:
JackEyedJones написа:
08 ное 2019, 18:14

Код: Избери всички

/* AMX Mod X
*   No Objectives
*
* (c) Copyright 2007 by VEN
*
* This file is provided as is (no warranties)
*
*	DESCRIPTION
*		Plugin allow to remove all map objectives or objectives of certain type.
*		Round timer will be disbled for maps that doesn't contain any objectives.
*
*	CVARS
*		no_objectives (flags: acde, default: acde, "": disable the plugin)
*			a - remove "as" (vip assasination) objectives
*			c - remove "cs" (hostage rescue) objectives
*			d - remove "de" (bomb defuse) objectives
*			e - remove "es" (T escape) objectives
*		Note: map change on CVar change required.
*
*	VERSIONS
*		0.3
*			- added support for all objective entities
*			- fixed: timer wasn't shown on multi objective maps if objectives wasn't completely removed
*			- improvements in objective modes routine
*		0.2
*			- disabled round timer
*			- added no_objectives CVar
*		0.1
*			- initial version
*/

// plugin's main information
#define PLUGIN_NAME "No Objectives"
#define PLUGIN_VERSION "0.3"
#define PLUGIN_AUTHOR "VEN"

#include <amxmodx>
#include <fakemeta>

new const g_objective_ents[][] = 
{
	"func_bomb_target",
	"info_bomb_target",
	"hostage_entity",
	"monster_scientist",
	"func_hostage_rescue",
	"info_hostage_rescue",
	"info_vip_start",
	"func_vip_safetyzone",
	"func_escapezone"
}

#define OBJTYPE_AS (1<<0)
#define OBJTYPE_CS (1<<2)
#define OBJTYPE_DE (1<<3)
#define OBJTYPE_ES (1<<4)
#define OBJTYPE_ALL (OBJTYPE_AS | OBJTYPE_CS | OBJTYPE_DE | OBJTYPE_ES)

#define CVAR_NAME "no_objectives"
#define CVAR_DEFAULT OBJTYPE_ALL

new const g_objective_type[] = {
	OBJTYPE_DE,
	OBJTYPE_DE,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_CS,
	OBJTYPE_AS,
	OBJTYPE_AS,
	OBJTYPE_ES
}

new const bool:g_objective_prim[] = {
	true,
	true,
	true,
	false,
	false,
	false,
	false,
	true,
	true
}

#define HIDE_ROUND_TIMER (1<<4)

new g_msgid_hideweapon

new g_pcvar_no_objectives

new g_no_objectives = CVAR_DEFAULT & OBJTYPE_ALL

public plugin_precache() {
	if ((g_pcvar_no_objectives = get_cvar_pointer(CVAR_NAME))) {
		new cvar_val[8]
		get_pcvar_string(g_pcvar_no_objectives, cvar_val, sizeof cvar_val - 1)
		g_no_objectives = read_flags(cvar_val) & OBJTYPE_ALL
	}

	if (g_no_objectives)
		register_forward(FM_Spawn, "forward_spawn")
}

public plugin_init() {
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

	if (!g_pcvar_no_objectives) {
		new cvar_defval[8]
		get_flags(CVAR_DEFAULT, cvar_defval, sizeof cvar_defval - 1)
		register_cvar(CVAR_NAME, cvar_defval)
	}

	if (is_objective_map())
		return

	g_msgid_hideweapon = get_user_msgid("HideWeapon")
	register_message(g_msgid_hideweapon, "message_hide_weapon")
	register_event("ResetHUD", "event_hud_reset", "b")
	set_msg_block(get_user_msgid("RoundTime"), BLOCK_SET)
}

public forward_spawn(ent) {
	if (!pev_valid(ent))
		return FMRES_IGNORED

	static classname[32], i
	pev(ent, pev_classname, classname, sizeof classname - 1)
	for (i = 0; i < sizeof g_objective_ents; ++i) {
		if (equal(classname, g_objective_ents[i])) {
			if (!(g_no_objectives & g_objective_type[i]))
				return FMRES_IGNORED

			engfunc(EngFunc_RemoveEntity, ent)
			return FMRES_SUPERCEDE
		}
	}

	return FMRES_IGNORED
}

public message_hide_weapon() {
	set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(1) | HIDE_ROUND_TIMER)
}

public event_hud_reset(id) {
	message_begin(MSG_ONE, g_msgid_hideweapon, _, id)
	write_byte(HIDE_ROUND_TIMER)
	message_end()
}

bool:is_objective_map() {
	new const classname[] = "classname"
	for (new i = 0; i < sizeof g_objective_ents; ++i) {
		if (g_objective_prim[i] && engfunc(EngFunc_FindEntityByString, FM_NULLENT, classname, g_objective_ents[i]))
			return true
	}

	return false
}
:dtm:
Стана пичага благодаря мноого
ЗАКРИВАЙТЕ ТЕМАТА ! благодаря

Потребителски аватар

OciXCrom TM
Администратор
Администратор
Мнения: 5564
Регистриран: 06 окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 102 пъти
Получена благодарност: 648 пъти
Години: 22
Контакти:

Как да махна времето за игра в картата

Мнение от OciXCrom TM » 08 ное 2019, 20:20

използвам онлайн комплиматор
Точно това е проблемът.
https://www.amxx-bg.info/viewtopic.php?t=760

Заключена

Върни се в “Поддръжка / Помощ”

Кой е на линия

Потребители, разглеждащи този форум: Няма регистрирани потребители и 2 госта