Преработка на infinite_bpammo_light.

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
devilchy
Извън линия
Рекламатор
Рекламатор
Мнения: 223
Регистриран на: 03 Фев 2017, 14:08
Местоположение: Burgas
Се отблагодари: 3 пъти
Получена благодарност: 6 пъти
Обратна връзка:

Преработка на infinite_bpammo_light.

Мнение от devilchy » 21 Мар 2017, 19:27

Здравейте приятели,имам следния проблем с плъгина infinite_bpammo_light този плъгин го ползвам за респаун сървъра ми.
но проблема е че плъгина първо почна да трупа в error лога грешката за Debug даже сървъра стигна до краш, поставих дебъг
после почна да дропи следната грешка.

Код за потвърждение: Избери целия код

L 03/21/2017 - 17:52:51: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 17:52:51: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 17:52:51: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 17:52:51: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 17:52:51: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 17:52:51: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 17:52:51: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 18:16:51: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 18:16:51: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 18:16:51: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 18:16:51: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 18:16:51: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 18:16:51: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 18:16:51: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 18:16:51: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 18:16:51: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 18:16:51: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 18:16:51: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 18:16:51: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 18:16:51: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 18:16:51: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 18:16:51: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 18:16:51: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 18:16:51: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 18:19:52: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 18:19:52: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 18:19:52: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 18:19:52: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 18:19:52: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 18:19:52: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 18:19:52: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 18:19:52: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 18:19:52: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 18:19:52: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
L 03/21/2017 - 18:19:52: [AMXX] Run time error 4: index out of bounds 
L 03/21/2017 - 18:19:52: [AMXX]    [0] 81853.attach::Message_AmmoX (line 83)
L 03/21/2017 - 18:19:52: [AMXX] Displaying debug trace (plugin "infinite_bpammo_light.amxx")
Source Code на въпросния плъгин:

Код за потвърждение: Избери целия код

/*	Formatright © 2009, ConnorMcLeod

	Infinite BpAmmo is free software;
	you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with Infinite BpAmmo; if not, write to the
	Free Software Foundation, Inc., 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA.
*/

// #define UNLIMITED_NADES

#include <amxmodx>
#include <fakemeta>

#define VERSION "0.0.1"

enum
{
	AmmoX_AmmoID = 1,
	AmmoX_Ammount
}

enum
{
	ammo_none,
	ammo_338magnum = 1, // 30
	ammo_762nato, // 90
	ammo_556natobox, // 200
	ammo_556nato, // 90
	ammo_buckshot, // 32
	ammo_45acp, // 100
	ammo_57mm, // 100
	ammo_50ae, // 35
	ammo_357sig, // 52
	ammo_9mm, // 120
	ammo_flashbang, // 2
	ammo_hegrenade, // 1
	ammo_smokegrenade, // 1
	ammo_c4 // 1
}

new const g_iMaxBpAmmo[] = {
	0,
	30,
	90,
	200,
	90,
	32,
	100,
	100,
	35,
	52,
	120,
	2,
	1,
	1,
	1
}

#define XO_PLAYER 5
#define m_rgpPlayerItems_0 376

public plugin_init()
{
	register_plugin("Infinite BpAmmo", VERSION, "ConnorMcLeod")
	register_message(get_user_msgid("AmmoX"), "Message_AmmoX")
}

public Message_AmmoX(iMsgId, iMsgDest, id)
{
	new iAmmoID = get_msg_arg_int(AmmoX_AmmoID)

	if( is_user_alive(id) && iAmmoID )
	{
		new iMaxBpAmmo = g_iMaxBpAmmo[iAmmoID]
		if( get_msg_arg_int(AmmoX_Ammount) < iMaxBpAmmo )
		{
			#if defined UNLIMITED_NADES
			if( iAmmoID < ammo_c4 )
			#else
			if( iAmmoID <= ammo_9mm )
			#endif
			{
				set_msg_arg_int(AmmoX_Ammount, ARG_BYTE, iMaxBpAmmo)
				set_pdata_int(id, m_rgpPlayerItems_0 + iAmmoID, iMaxBpAmmo, XO_PLAYER)
			}
		}
	}
}

Благодаря на тези които ще помогнат !

Аватар
TryAgain
Извън линия
Потребител
Потребител
Мнения: 171
Регистриран на: 25 Яну 2017, 16:59
Се отблагодари: 1 път
Получена благодарност: 20 пъти

Преработка на infinite_bpammo_light.

Мнение от TryAgain » 21 Яну 2022, 19:58

Код за потвърждение: Избери целия код

/*	Formatright © 2009, ConnorMcLeod

	Infinite BpAmmo is free software;
	you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with Infinite BpAmmo; if not, write to the
	Free Software Foundation, Inc., 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA.
*/

// #define UNLIMITED_NADES

#include <amxmodx>
#include <fakemeta>

#define VERSION "0.0.1"

enum
{
	AmmoX_AmmoID = 1,
	AmmoX_Ammount
}

enum
{
	ammo_none,
	ammo_338magnum = 1, // 30
	ammo_762nato, // 90
	ammo_556natobox, // 200
	ammo_556nato, // 90
	ammo_buckshot, // 32
	ammo_45acp, // 100
	ammo_57mm, // 100
	ammo_50ae, // 35
	ammo_357sig, // 52
	ammo_9mm, // 120
	ammo_flashbang, // 2
	ammo_hegrenade, // 1
	ammo_smokegrenade, // 1
	ammo_c4 // 1
}

new const g_iMaxBpAmmo[] = {
	0,
	30,
	90,
	200,
	90,
	32,
	100,
	100,
	35,
	52,
	120,
	2,
	1,
	1,
	1
}

#define XO_PLAYER 5
#define m_rgpPlayerItems_0 376

public plugin_init()
{
	register_plugin("Infinite BpAmmo", VERSION, "ConnorMcLeod")
	register_message(get_user_msgid("AmmoX"), "Message_AmmoX")
}

public Message_AmmoX(iMsgId, iMsgDest, id)
{
	new iAmmoID = get_msg_arg_int(AmmoX_AmmoID)

	if( is_user_alive(id) && is_user_connected(id) && iAmmoID )
	{
		new iMaxBpAmmo = g_iMaxBpAmmo[iAmmoID]
		if( get_msg_arg_int(AmmoX_Ammount) < iMaxBpAmmo )
		{
			#if defined UNLIMITED_NADES
			if( iAmmoID < ammo_c4 )
			#else
			if( iAmmoID <= ammo_9mm )
			#endif
			{
				set_msg_arg_int(AmmoX_Ammount, ARG_BYTE, iMaxBpAmmo)
				set_pdata_int(id, m_rgpPlayerItems_0 + iAmmoID, iMaxBpAmmo, XO_PLAYER)
			}
		}
	}
} 

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 3 госта