csdm_ffa.sma native errori

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

20 Dec 2013, 14:51

.sma | Afiseaza codul
[code]/**
 * csdm_ffa.sma
 * Allows for Counter-Strike to be played as DeathMatch.
 *
 * CSDM FFA - Sets free-for-all mode on other plugins.
 *
 * (C)2003-2006 David "BAILOPAN" Anderson
 *
 *  Give credit where due.
 *  Share the source - it sets you free
 *  http://www.opensource.org/
 *  http://www.gnu.org/
 */
 
#include <amxmodx>
#include <amxmisc>
#include <csdm>
#pragma library csdm_main

new PLUGIN[]	= "CSDM Main"
new VERSION[]	= CSDM_VERSION
new AUTHOR[]	= "CSDM Team"
new ACCESS		= ADMIN_MAP

new bool:g_MainPlugin = true

public plugin_natives()
{
	set_module_filter("module_filter")
	set_native_filter("native_filter")
}

public module_filter(const module[])
{
	if (equali(module, "csdm_main"))
		return PLUGIN_HANDLED
	
	return PLUGIN_CONTINUE
}

public native_filter(const name[], index, trap)
{
	if (!trap)
		return PLUGIN_HANDLED
		
	return PLUGIN_CONTINUE
}

public csdm_Init(const version[])
{
	if (version[0] == 0)
	{
		set_fail_state("CSDM failed to load.")
		return
	}
}

public csdm_CfgInit()
{	
	csdm_reg_cfg("ffa", "read_cfg")
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_concmd("csdm_ffa_enable", "csdm_ffa_enable", ACCESS, "Enables FFA Mode")
	register_concmd("csdm_ffa_disable", "csdm_ffa_disable", ACCESS, "Disables FFA Mode")
	register_concmd("csdm_ffa_ctrl", "csdm_ffa_ctrl", ACCESS, "FFA Toggling")
	
	g_MainPlugin = module_exists("csdm_main") ? true : false
	
	if (g_MainPlugin)
	{
		new menu = csdm_main_menu()
		
		new callback = menu_makecallback("hook_item_display")
		menu_additem(menu, "Enable/Disable FFA", "csdm_ffa_ctrl", ADMIN_MAP, callback)
	}
	
	set_task(4.0, "enforce_ffa")
	
	register_message(get_user_msgid("Radar"), "Radar_Hook")
}

public Radar_Hook(msg_id, msg_dest, msg_entity)
{
	if (csdm_get_ffa())
	{
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

public enforce_ffa()
{
	//enforce this
	if (csdm_get_ffa())
	{
		set_cvar_num("mp_friendlyfire", 1)
	}
}

public csdm_ffa_ctrl(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
	
	csdm_set_ffa( csdm_get_ffa() ? 0 : 1 )
	client_print(id, print_chat, "[CSDM] CSDM FFA mode changed.")
	
	return PLUGIN_HANDLED
}

public hook_item_display(player, menu, item)
{
	new paccess, command[24], call
	
	menu_item_getinfo(menu, item, paccess, command, 23, _, 0, call)
	
	if (equali(command, "csdm_ffa_ctrl"))
	{
		if (!csdm_get_ffa())
		{
			menu_item_setname(menu, item, "Enable FFA")
		} else {
			menu_item_setname(menu, item, "Disable FFA")
		}
	}
}

public csdm_ffa_enable(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED

	csdm_set_ffa(1)
	client_print(id, print_chat, "CSDM FFA enabled.")
	
	return PLUGIN_HANDLED	
}

public csdm_ffa_disable(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED

	csdm_set_ffa(0)
	client_print(id, print_chat, "CSDM FFA disabled.")
	
	return PLUGIN_HANDLED	
}

public read_cfg(readAction, line[], section[])
{
	if (readAction == CFG_READ)
	{
		new setting[24], sign[3], value[32];

		parse(line, setting, 23, sign, 2, value, 31);
	
		if (equali(setting, "enabled"))
		{
			csdm_set_ffa(str_to_num(value))
		}
	}
}
[/code]
Am si eu pluginu asta care da niste errori in logs
logs | Afiseaza codul
[code]L 12/20/2013 - 14:46:08: Start of error session.
L 12/20/2013 - 14:46:08: Info (map "fy_snow") (file "addons/amxmodx/logs/error_20131220.log")
L 12/20/2013 - 14:46:08: Invalid menu id -1(7)
L 12/20/2013 - 14:46:08: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/20/2013 - 14:46:08: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/20/2013 - 14:46:08: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
[/code]
Last edited by CsN^ ;x on 20 Dec 2013, 18:30, edited 1 time in total.
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
RoyalServer
User avatar
Deevix
Membru, skill +1
Membru, skill +1
Posts: 191
Joined: 10 Aug 2013, 23:17
Detinator Steam: Nu
CS Status: Zombie
Location: Summoner's Rift
Has thanked: 14 times
Been thanked: 5 times
Contact:

20 Dec 2013, 14:53

Incearca sa scri in plugins.ini

Code: Select all

csdm_ffa.amxx debug
[/b]
Image

ZOMBIE MOD3 LIKE BETA V1.0 (BASED ON ZP) (89%) [PRIVAT]
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

20 Dec 2013, 14:58

Deevix wrote:Incearca sa scri in plugins.ini

Code: Select all

csdm_ffa.amxx debug
[/b]
Sincer si tu faci cererii ca mine si din cate am vazut nici tu nu sti cum sa rezolvi o cerere,postu tau e facut pentru +1 (nu vreau sa fiu rautacios cu tine dar totusi)
logs | Afiseaza codul
L 12/20/2013 - 14:46:08: Start of error session.
L 12/20/2013 - 14:46:08: Info (map "fy_snow") (file "addons/amxmodx/logs/error_20131220.log")
L 12/20/2013 - 14:46:08: Invalid menu id -1(7)
L 12/20/2013 - 14:46:08: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/20/2013 - 14:46:08: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/20/2013 - 14:46:08: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
Deevix
Membru, skill +1
Membru, skill +1
Posts: 191
Joined: 10 Aug 2013, 23:17
Detinator Steam: Nu
CS Status: Zombie
Location: Summoner's Rift
Has thanked: 14 times
Been thanked: 5 times
Contact:

20 Dec 2013, 15:14

Nu am fost atent , credeam ca era

Code: Select all

L 12/20/2013 - 14:46:08: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
Am inteles altceva ca is rupt de somn.
PS: Eu inca invat scripting , si incerc sa ajut cat pot dar cu cei ce vor totul pe tava...
[/b]
Image

ZOMBIE MOD3 LIKE BETA V1.0 (BASED ON ZP) (89%) [PRIVAT]
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

20 Dec 2013, 15:24

Deevix wrote:Nu am fost atent , credeam ca era

Code: Select all

L 12/20/2013 - 14:46:08: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
Am inteles altceva ca is rupt de somn.
PS: Eu inca invat scripting , si incerc sa ajut cat pot dar cu cei ce vor totul pe tava...
[/b]
Bine,am inteles esti somnorors nu ai vazut,multumesc ca ai incercat sa ma ajuti ce pot zice.
Si pe tava nu vreau totu dar din pacate are 1-0 scripting-ul pentru mine ca niciodata nu il voi intelege. (pentru mine e greu sa invat si scripting si liceu)
Cineva ?Ma poate ajuta ?
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

20 Dec 2013, 17:03

| Afiseaza codul
/**
* csdm_ffa.sma
* Allows for Counter-Strike to be played as DeathMatch.
*
* CSDM FFA - Sets free-for-all mode on other plugins.
*
* (C)2003-2006 David "BAILOPAN" Anderson
*
*  Give credit where due.
*  Share the source - it sets you free
*  http://www.opensource.org/
*  http://www.gnu.org/
*/

#include <amxmodx>
#include <amxmisc>
#include <csdm>
#pragma library csdm_main

new PLUGIN[]   = "CSDM Main"
new VERSION[]   = CSDM_VERSION
new AUTHOR[]   = "CSDM Team"
new ACCESS      = ADMIN_MAP

new bool:g_MainPlugin = true

public plugin_natives()
{
	set_module_filter("module_filter")
	set_native_filter("native_filter")
}

public module_filter(const module[])
{
	if (equali(module, "csdm_main"))
		return PLUGIN_HANDLED
	
	return PLUGIN_CONTINUE
}

public native_filter(const name[], index, trap)
{
	if (!trap)
		return PLUGIN_HANDLED
	
	return PLUGIN_CONTINUE
}

public csdm_Init(const version[])
{
	if (version[0] == 0)
	{
		set_fail_state("CSDM failed to load.")
		return
	}
}

public csdm_CfgInit()
{   
	csdm_reg_cfg("ffa", "read_cfg")
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_concmd("csdm_ffa_enable", "csdm_ffa_enable", ACCESS, "Enables FFA Mode")
	register_concmd("csdm_ffa_disable", "csdm_ffa_disable", ACCESS, "Disables FFA Mode")
	register_concmd("csdm_ffa_ctrl", "csdm_ffa_ctrl", ACCESS, "FFA Toggling")
	
	g_MainPlugin = module_exists("csdm_main") ? true : false
	
	if (g_MainPlugin)
	{
		new menu = csdm_main_menu()
		
		menu_additem(menu, "Enable/Disable FFA", "csdm_ffa_ctrl", ADMIN_MAP)
		
		menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	}
	
	set_task(4.0, "enforce_ffa")
	
	register_message(get_user_msgid("Radar"), "Radar_Hook")
}

public Radar_Hook(msg_id, msg_dest, msg_entity)
{
	if (csdm_get_ffa())
	{
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

public enforce_ffa()
{
	//enforce this
	if (csdm_get_ffa())
	{
		set_cvar_num("mp_friendlyfire", 1)
	}
}

public csdm_ffa_ctrl(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
	
	csdm_set_ffa( csdm_get_ffa() ? 0 : 1 )
	client_print(id, print_chat, "[CSDM] CSDM FFA mode changed.")
	
	return PLUGIN_HANDLED
}

public hook_item_display(player, menu, item)
{
	new paccess, command[24], call
	
	menu_item_getinfo(menu, item, paccess, command, 23, _, 0, call)
	
	if (equali(command, "csdm_ffa_ctrl"))
	{
		if (!csdm_get_ffa())
		{
			menu_item_setname(menu, item, "Enable FFA")
			} else {
			menu_item_setname(menu, item, "Disable FFA")
		}
	}
}

public csdm_ffa_enable(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
	
	csdm_set_ffa(1)
	client_print(id, print_chat, "CSDM FFA enabled.")
	
	return PLUGIN_HANDLED   
}

public csdm_ffa_disable(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
	
	csdm_set_ffa(0)
	client_print(id, print_chat, "CSDM FFA disabled.")
	
	return PLUGIN_HANDLED   
}

public read_cfg(readAction, line[], section[])
{
	if (readAction == CFG_READ)
	{
		new setting[24], sign[3], value[32];
		
		parse(line, setting, 23, sign, 2, value, 31);
		
		if (equali(setting, "enabled"))
		{
			csdm_set_ffa(str_to_num(value))
		}
	}
}
Incearca :-??
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

20 Dec 2013, 18:30

Code: Select all

L 12/20/2013 - 14:46:08: Start of error session.
L 12/20/2013 - 14:46:08: Info (map "fy_snow") (file "addons/amxmodx/logs/error_20131220.log")
L 12/20/2013 - 14:46:08: Invalid menu id -1(7)
L 12/20/2013 - 14:46:08: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/20/2013 - 14:46:08: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/20/2013 - 14:46:08: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
L 12/20/2013 - 15:31:20: Start of error session.
L 12/20/2013 - 15:31:20: Info (map "de_nuke") (file "addons/amxmodx/logs/error_20131220.log")
L 12/20/2013 - 15:31:20: Invalid menu id -1(7)
L 12/20/2013 - 15:31:20: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/20/2013 - 15:31:20: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/20/2013 - 15:31:20: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
L 12/20/2013 - 15:32:35: Start of error session.
L 12/20/2013 - 15:32:35: Info (map "fy_snow") (file "addons/amxmodx/logs/error_20131220.log")
L 12/20/2013 - 15:32:35: Invalid menu id -1(7)
L 12/20/2013 - 15:32:35: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/20/2013 - 15:32:35: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/20/2013 - 15:32:35: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
L 12/20/2013 - 16:01:23: Start of error session.
L 12/20/2013 - 16:01:23: Info (map "de_dust2_long") (file "addons/amxmodx/logs/error_20131220.log")
L 12/20/2013 - 16:01:23: Invalid menu id -1(7)
L 12/20/2013 - 16:01:23: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/20/2013 - 16:01:23: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/20/2013 - 16:01:23: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
L 12/20/2013 - 16:47:16: Start of error session.
L 12/20/2013 - 16:47:16: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20131220.log")
L 12/20/2013 - 16:47:16: Invalid menu id -1(7)
L 12/20/2013 - 16:47:16: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/20/2013 - 16:47:16: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/20/2013 - 16:47:16: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
Da alta linie acuma man .
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
teNNeke.
Membru, skill +1
Membru, skill +1
Posts: 318
Joined: 01 Sep 2013, 17:59
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 36 times
Been thanked: 9 times
Contact:

20 Dec 2013, 20:36

| Afiseaza codul
/**
 * csdm_ffa.sma
 * Allows for Counter-Strike to be played as DeathMatch.
 *
 * CSDM FFA - Sets free-for-all mode on other plugins.
 *
 * (C)2003-2006 David "BAILOPAN" Anderson
 *
 *  Give credit where due.
 *  Share the source - it sets you free
 *  http://www.opensource.org/
 *  http://www.gnu.org/
 */
 
#include <amxmodx>
#include <amxmisc>
#include <csdm>
#pragma library csdm_main

new PLUGIN[]	= "CSDM Main"
new VERSION[]	= CSDM_VERSION
new AUTHOR[]	= "CSDM Team"
new ACCESS		= ADMIN_MAP

new bool:g_MainPlugin = true

public plugin_natives()
{
	set_module_filter("module_filter")
	set_native_filter("native_filter")
}

public module_filter(const module[])
{
	if (equali(module, "csdm_main"))
		return PLUGIN_HANDLED
	
	return PLUGIN_CONTINUE
}

public native_filter(const name[], index, trap)
{
	if (!trap)
		return PLUGIN_HANDLED
		
	return PLUGIN_CONTINUE
}

public csdm_Init(const version[])
{
	if (version[0] == 0)
	{
		set_fail_state("CSDM failed to load.")
		return
	}
}

public csdm_CfgInit()
{	
	csdm_reg_cfg("ffa", "read_cfg")
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_concmd("csdm_ffa_enable", "csdm_ffa_enable", ACCESS, "Enables FFA Mode")
	register_concmd("csdm_ffa_disable", "csdm_ffa_disable", ACCESS, "Disables FFA Mode")
	register_concmd("csdm_ffa_ctrl", "csdm_ffa_ctrl", ACCESS, "FFA Toggling")
	
	g_MainPlugin = module_exists("csdm_main") ? true : false
	
	if (g_MainPlugin)
	{
		new menu = csdm_main_menu()
		
		new callback = menu_makecallback("hook_item_display")
		menu_additem(menu, "Enable/Disable FFA", "csdm_ffa_ctrl", ADMIN_MAP, callback)
	}
	
	set_task(4.0, "enforce_ffa")
	
	register_message(get_user_msgid("Radar"), "Radar_Hook")
}

public Radar_Hook(msg_id, msg_dest, msg_entity)
{
	if (csdm_get_ffa())
	{
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

public enforce_ffa()
{
	//enforce this
	if (csdm_get_ffa())
	{
		set_cvar_num("mp_friendlyfire", 1)
	}
}

public csdm_ffa_ctrl(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
	
	csdm_set_ffa( csdm_get_ffa() ? 0 : 1 )
	client_print(id, print_chat, "[CSDM] CSDM FFA mode changed.")
	
	return PLUGIN_HANDLED
}

public hook_item_display(player, menu, item)
{
	new paccess, command[24], call
	
	menu_item_getinfo(menu, item, paccess, command, 23, _, 0, call)
	
	if (equali(command, "csdm_ffa_ctrl"))
	{
		if (!csdm_get_ffa())
		{
			menu_item_setname(menu, item, "Enable FFA")
		} else {
			menu_item_setname(menu, item, "Disable FFA")
		}
	}
}

public csdm_ffa_enable(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED

	csdm_set_ffa(1)
	client_print(id, print_chat, "CSDM FFA enabled.")
	
	return PLUGIN_HANDLED	
}

public csdm_ffa_disable(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED

	csdm_set_ffa(0)
	client_print(id, print_chat, "CSDM FFA disabled.")
	
	return PLUGIN_HANDLED	
}

public read_cfg(readAction, line[], section[])
{
	if (readAction == CFG_READ)
	{
		new setting[24], sign[3], value[32];

		parse(line, setting, 23, sign, 2, value, 31);
	
		if (equali(setting, "enabled"))
		{
			csdm_set_ffa(str_to_num(value))
		}
	}
}
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

21 Dec 2013, 17:33

teNNeke. wrote:
| Afiseaza codul
/**
 * csdm_ffa.sma
 * Allows for Counter-Strike to be played as DeathMatch.
 *
 * CSDM FFA - Sets free-for-all mode on other plugins.
 *
 * (C)2003-2006 David "BAILOPAN" Anderson
 *
 *  Give credit where due.
 *  Share the source - it sets you free
 *  http://www.opensource.org/
 *  http://www.gnu.org/
 */
 
#include <amxmodx>
#include <amxmisc>
#include <csdm>
#pragma library csdm_main

new PLUGIN[]	= "CSDM Main"
new VERSION[]	= CSDM_VERSION
new AUTHOR[]	= "CSDM Team"
new ACCESS		= ADMIN_MAP

new bool:g_MainPlugin = true

public plugin_natives()
{
	set_module_filter("module_filter")
	set_native_filter("native_filter")
}

public module_filter(const module[])
{
	if (equali(module, "csdm_main"))
		return PLUGIN_HANDLED
	
	return PLUGIN_CONTINUE
}

public native_filter(const name[], index, trap)
{
	if (!trap)
		return PLUGIN_HANDLED
		
	return PLUGIN_CONTINUE
}

public csdm_Init(const version[])
{
	if (version[0] == 0)
	{
		set_fail_state("CSDM failed to load.")
		return
	}
}

public csdm_CfgInit()
{	
	csdm_reg_cfg("ffa", "read_cfg")
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_concmd("csdm_ffa_enable", "csdm_ffa_enable", ACCESS, "Enables FFA Mode")
	register_concmd("csdm_ffa_disable", "csdm_ffa_disable", ACCESS, "Disables FFA Mode")
	register_concmd("csdm_ffa_ctrl", "csdm_ffa_ctrl", ACCESS, "FFA Toggling")
	
	g_MainPlugin = module_exists("csdm_main") ? true : false
	
	if (g_MainPlugin)
	{
		new menu = csdm_main_menu()
		
		new callback = menu_makecallback("hook_item_display")
		menu_additem(menu, "Enable/Disable FFA", "csdm_ffa_ctrl", ADMIN_MAP, callback)
	}
	
	set_task(4.0, "enforce_ffa")
	
	register_message(get_user_msgid("Radar"), "Radar_Hook")
}

public Radar_Hook(msg_id, msg_dest, msg_entity)
{
	if (csdm_get_ffa())
	{
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

public enforce_ffa()
{
	//enforce this
	if (csdm_get_ffa())
	{
		set_cvar_num("mp_friendlyfire", 1)
	}
}

public csdm_ffa_ctrl(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
	
	csdm_set_ffa( csdm_get_ffa() ? 0 : 1 )
	client_print(id, print_chat, "[CSDM] CSDM FFA mode changed.")
	
	return PLUGIN_HANDLED
}

public hook_item_display(player, menu, item)
{
	new paccess, command[24], call
	
	menu_item_getinfo(menu, item, paccess, command, 23, _, 0, call)
	
	if (equali(command, "csdm_ffa_ctrl"))
	{
		if (!csdm_get_ffa())
		{
			menu_item_setname(menu, item, "Enable FFA")
		} else {
			menu_item_setname(menu, item, "Disable FFA")
		}
	}
}

public csdm_ffa_enable(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED

	csdm_set_ffa(1)
	client_print(id, print_chat, "CSDM FFA enabled.")
	
	return PLUGIN_HANDLED	
}

public csdm_ffa_disable(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED

	csdm_set_ffa(0)
	client_print(id, print_chat, "CSDM FFA disabled.")
	
	return PLUGIN_HANDLED	
}

public read_cfg(readAction, line[], section[])
{
	if (readAction == CFG_READ)
	{
		new setting[24], sign[3], value[32];

		parse(line, setting, 23, sign, 2, value, 31);
	
		if (equali(setting, "enabled"))
		{
			csdm_set_ffa(str_to_num(value))
		}
	}
}
Acum imi apare asta
| Afiseaza codul
[code]L 12/21/2013 - 13:13:23: Start of error session.
L 12/21/2013 - 13:13:23: Info (map "de_dust2x2") (file "addons/amxmodx/logs/error_20131221.log")
L 12/21/2013 - 13:13:23: Invalid menu id -1(7)
L 12/21/2013 - 13:13:23: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/21/2013 - 13:13:23: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/21/2013 - 13:13:23: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
L 12/21/2013 - 13:58:53: Start of error session.
L 12/21/2013 - 13:58:53: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20131221.log")
L 12/21/2013 - 13:58:53: Invalid menu id -1(7)
L 12/21/2013 - 13:58:53: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/21/2013 - 13:58:53: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/21/2013 - 13:58:53: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
L 12/21/2013 - 14:56:55: Start of error session.
L 12/21/2013 - 14:56:55: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20131221.log")
L 12/21/2013 - 14:56:55: Invalid menu id -1(7)
L 12/21/2013 - 14:56:55: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/21/2013 - 14:56:55: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/21/2013 - 14:56:55: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
L 12/21/2013 - 15:40:44: Start of error session.
L 12/21/2013 - 15:40:44: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20131221.log")
L 12/21/2013 - 15:40:44: Invalid menu id -1(7)
L 12/21/2013 - 15:40:44: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/21/2013 - 15:40:44: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/21/2013 - 15:40:44: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
L 12/21/2013 - 16:04:20: [ENGINE] Invalid entity 121
L 12/21/2013 - 16:04:20: [AMXX] Run time error 10 (plugin "amx_parachute.amxx") (native "entity_get_int") - debug not enabled!
L 12/21/2013 - 16:04:20: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 12/21/2013 - 16:04:20: [ENGINE] Invalid entity 121
L 12/21/2013 - 16:04:20: [AMXX] Run time error 10 (plugin "amx_parachute.amxx") (native "entity_get_int") - debug not enabled!
L 12/21/2013 - 16:04:20: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 12/21/2013 - 16:04:20: [ENGINE] Invalid entity 121
L 12/21/2013 - 16:04:20: [AMXX] Run time error 10 (plugin "amx_parachute.amxx") (native "entity_get_int") - debug not enabled![/code]
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
teNNeke.
Membru, skill +1
Membru, skill +1
Posts: 318
Joined: 01 Sep 2013, 17:59
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 36 times
Been thanked: 9 times
Contact:

21 Dec 2013, 19:38

Ai erori din mai multe pluginuri X_X

Sigur ai activat modulele care iti trebuisc din modules.ini?
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

22 Dec 2013, 09:55

[quote="teNNeke."]
Sunt dar tot imi apare .
| Afiseaza codul
[code]L 12/21/2013 - 21:43:19: Start of error session.
L 12/21/2013 - 21:43:19: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20131221.log")
L 12/21/2013 - 21:43:19: Invalid menu id -1(7)
L 12/21/2013 - 21:43:19: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/21/2013 - 21:43:19: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/21/2013 - 21:43:19: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
L 12/21/2013 - 22:16:08: Start of error session.
L 12/21/2013 - 22:16:08: Info (map "de_nuke") (file "addons/amxmodx/logs/error_20131221.log")
L 12/21/2013 - 22:16:08: Invalid menu id -1(7)
L 12/21/2013 - 22:16:08: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/21/2013 - 22:16:08: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/21/2013 - 22:16:08: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
L 12/21/2013 - 22:48:54: Start of error session.
L 12/21/2013 - 22:48:54: Info (map "fy_snow") (file "addons/amxmodx/logs/error_20131221.log")
L 12/21/2013 - 22:48:54: Invalid menu id -1(7)
L 12/21/2013 - 22:48:54: [AMXX] Displaying debug trace (plugin "csdm_ffa.amxx")
L 12/21/2013 - 22:48:54: [AMXX] Run time error 10: native error (native "menu_additem")
L 12/21/2013 - 22:48:54: [AMXX]    [0] csdm_ffa.sma::plugin_init (line 78)
[/code]
Aceleas errori :-"
Last edited by CsN^ ;x on 05 Jan 2014, 09:13, edited 1 time in total.
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
satasa
Membru, skill +1
Membru, skill +1
Posts: 371
Joined: 12 Nov 2012, 10:43
Detinator Steam: Nu
CS Status: Ocupat
Reputatie: Membru Club eXtreamCS (2 iun - 2 iul, Acces in Club)
Has thanked: 55 times
Been thanked: 10 times
Contact:

22 Dec 2013, 22:03

incearca.. | Afiseaza codul
/**
 * csdm_ffa.sma
 * Allows for Counter-Strike to be played as DeathMatch.
 *
 * CSDM FFA - Sets free-for-all mode on other plugins.
 *
 * (C)2003-2006 David "BAILOPAN" Anderson
 *
 *  Give credit where due.
 *  Share the source - it sets you free
 *  http://www.opensource.org/
 *  http://www.gnu.org/
 */
 
#include <amxmodx>
#include <amxmisc>
#include <csdm>
#pragma library csdm_main

new PLUGIN[]   = "CSDM Main"
new VERSION[]   = CSDM_VERSION
new AUTHOR[]   = "CSDM Team"
new ACCESS      = ADMIN_MAP

new bool:g_MainPlugin = true

public plugin_natives()
{
   set_module_filter("module_filter")
   set_native_filter("native_filter")
}

public module_filter(const module[])
{
   if (equali(module, "csdm_main"))
      return PLUGIN_HANDLED
   
   return PLUGIN_CONTINUE
}

public native_filter(const name[], index, trap)
{
   if (!trap)
      return PLUGIN_HANDLED
      
   return PLUGIN_CONTINUE
}

public csdm_Init(const version[])
{
   if (version[0] == 0)
   {
      set_fail_state("CSDM failed to load.")
      return
   }
}

public csdm_CfgInit()
{   
   csdm_reg_cfg("ffa", "read_cfg")
}

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   register_concmd("csdm_ffa_enable", "csdm_ffa_enable", ACCESS, "Enables FFA Mode")
   register_concmd("csdm_ffa_disable", "csdm_ffa_disable", ACCESS, "Disables FFA Mode")
   register_concmd("csdm_ffa_ctrl", "csdm_ffa_ctrl", ACCESS, "FFA Toggling")
   
   g_MainPlugin = module_exists("csdm_main") ? true : false
   
   if (g_MainPlugin)
   {
      new menu = csdm_main_menu()
      
      new callback = menu_makecallback("hook_item_display")
      menu_additem (menu, "Enable/Disable FFA", "csdm_ffa_ctrl", ADMIN_MAP, callback)
   }
   
   set_task(4.0, "enforce_ffa")
   
   register_message(get_user_msgid("Radar"), "Radar_Hook")
}

public Radar_Hook(msg_id, msg_dest, msg_entity)
{
   if (csdm_get_ffa())
   {
      return PLUGIN_HANDLED
   }
   
   return PLUGIN_CONTINUE
}

public enforce_ffa()
{
   //enforce this
   if (csdm_get_ffa())
   {
      set_cvar_num("mp_friendlyfire", 1)
   }
}

public csdm_ffa_ctrl(id, level, cid)
{
   if (!cmd_access(id, level, cid, 1))
      return PLUGIN_HANDLED
   
   csdm_set_ffa( csdm_get_ffa() ? 0 : 1 )
   client_print(id, print_chat, "[CSDM] CSDM FFA mode changed.")
   
   return PLUGIN_HANDLED
}

public hook_item_display(player, menu, item)
{
   new paccess, command[24], call
   
   menu_item_getinfo(menu, item, paccess, command, 23, _, 0, call)
   
   if (equali(command, "csdm_ffa_ctrl"))
   {
      if (!csdm_get_ffa())
      {
         menu_item_setname(menu, item, "Enable FFA")
      } else {
         menu_item_setname(menu, item, "Disable FFA")
      }
   }
}

public csdm_ffa_enable(id, level, cid)
{
   if (!cmd_access(id, level, cid, 1))
      return PLUGIN_HANDLED

   csdm_set_ffa(1)
   client_print(id, print_chat, "CSDM FFA enabled.")
   
   return PLUGIN_HANDLED   
}

public csdm_ffa_disable(id, level, cid)
{
   if (!cmd_access(id, level, cid, 1))
      return PLUGIN_HANDLED

   csdm_set_ffa(0)
   client_print(id, print_chat, "CSDM FFA disabled.")
   
   return PLUGIN_HANDLED   
}

public read_cfg(readAction, line[], section[])
{
   if (readAction == CFG_READ)
   {
      new setting[24], sign[3], value[32];

      parse(line, setting, 23, sign, 2, value, 31);
   
      if (equali(setting, "enabled"))
      {
         csdm_set_ffa(str_to_num(value))
      }
   }
}
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests