bullet_damage - Преработка.

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
DoPe ;]]
Извън линия
Потребител
Потребител
Мнения: 402
Регистриран на: 27 Фев 2017, 22:10
Обратна връзка:

bullet_damage - Преработка.

Мнение от DoPe ;]] » 16 Фев 2018, 15:49

Да е само за хора с флаг: KICK
Прикачени файлове
bullet_damage.sma
(1.81 KiB) Свалено 65 пъти
bullet_damage.sma
(1.81 KiB) Свалено 65 пъти
The Best Deathrun Server: 79.124.49.91:27019
The Best Respawn Server: 79.124.49.88:27021

Аватар
southdivision
Извън линия
Потребител
Потребител
Мнения: 279
Регистриран на: 14 Окт 2016, 23:17
Местоположение: София
Се отблагодари: 8 пъти
Получена благодарност: 5 пъти
Обратна връзка:

bullet_damage - Преработка.

Мнение от southdivision » 16 Фев 2018, 16:07

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

/*	Copyright © 2009, ConnorMcLeod

	Bullet Damage 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 Bullet Damage; if not, write to the
	Free Software Foundation, Inc., 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <dhudmessage>

#define PLUGIN "Bullet Damage"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

#define MAX_PLAYERS	32

new const Float:g_flCoords[][] = 
{
	{0.50, 0.40},
	{0.56, 0.44},
	{0.60, 0.50},
	{0.56, 0.56},
	{0.50, 0.60},
	{0.44, 0.56},
	{0.40, 0.50},
	{0.44, 0.44}
}

new g_iPlayerPos[MAX_PLAYERS+1]

new g_iMaxPlayers
new g_pCvarEnabled

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

	g_pCvarEnabled = register_cvar("bullet_damage", "1")

	register_event("Damage", "Event_Damage", "b", "2>0", "3=0")

	g_iMaxPlayers = get_maxplayers()
}

public Event_Damage( iVictim )
{
	if( get_pcvar_num(g_pCvarEnabled) && (read_data(4) || read_data(5) || read_data(6)))
	{
		new id = get_user_attacker(iVictim)
		if( (1 <= id <= g_iMaxPlayers) && is_user_connected(id) && get_user_flags( id ) & ADMIN_KICK )
		{
			new iPos = ++g_iPlayerPos[id]
			if( iPos == sizeof(g_flCoords) )
			{
				iPos = g_iPlayerPos[id] = 0
			}
			set_dhudmessage(random(256),random(256),random(256), Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1)
			show_dhudmessage(id, "%d", read_data(2))
		}
	}
}
Последно промяна от southdivision на 16 Фев 2018, 16:29, променено общо 1 път.

Аватар
TheRedShoko
Извън линия
Модератор
Модератор
Мнения: 1016
Регистриран на: 06 Окт 2016, 07:42
Местоположение: Бургас
Се отблагодари: 5 пъти
Получена благодарност: 84 пъти

bullet_damage - Преработка.

Мнение от TheRedShoko » 16 Фев 2018, 16:13

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

/*	Copyright © 2009, ConnorMcLeod

	Bullet Damage 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 Bullet Damage; if not, write to the
	Free Software Foundation, Inc., 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <dhudmessage>

#define PLUGIN "Bullet Damage"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

#define MAX_PLAYERS	32

new const Float:g_flCoords[][] = 
{
	{0.50, 0.40},
	{0.56, 0.44},
	{0.60, 0.50},
	{0.56, 0.56},
	{0.50, 0.60},
	{0.44, 0.56},
	{0.40, 0.50},
	{0.44, 0.44}
}

new g_iPlayerPos[MAX_PLAYERS+1]

new g_iMaxPlayers
new g_pCvarEnabled

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

	g_pCvarEnabled = register_cvar("bullet_damage", "1")

	register_event("Damage", "Event_Damage", "b", "2>0", "3=0")

	g_iMaxPlayers = get_maxplayers()
}

public Event_Damage( iVictim )
{
	if( get_pcvar_num(g_pCvarEnabled) && (read_data(4) || read_data(5) || read_data(6)))
	{
		new id = get_user_attacker(iVictim)
		if( (1 <= id <= g_iMaxPlayers) && is_user_connected(id) && get_user_flags(id) & ADMIN_KICK)
		{
			new iPos = ++g_iPlayerPos[id]
			if( iPos == sizeof(g_flCoords) )
			{
				iPos = g_iPlayerPos[id] = 0
			}
			set_dhudmessage(random(256),random(256),random(256), Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1)
			show_dhudmessage(id, "%d", read_data(2))
		}
	}
}

Аватар
DoPe ;]]
Извън линия
Потребител
Потребител
Мнения: 402
Регистриран на: 27 Фев 2017, 22:10
Обратна връзка:

bullet_damage - Преработка.

Мнение от DoPe ;]] » 16 Фев 2018, 16:14

Доста грешки... - http://prntscr.com/ifmhfs
The Best Deathrun Server: 79.124.49.91:27019
The Best Respawn Server: 79.124.49.88:27021

Аватар
DEBIAN.
Извън линия
Потребител
Потребител
Мнения: 32
Регистриран на: 03 Фев 2018, 21:02

bullet_damage - Преработка.

Мнение от DEBIAN. » 16 Фев 2018, 17:58

С коя версия на амхх си?

Аватар
DoPe ;]]
Извън линия
Потребител
Потребител
Мнения: 402
Регистриран на: 27 Фев 2017, 22:10
Обратна връзка:

bullet_damage - Преработка.

Мнение от DoPe ;]] » 16 Фев 2018, 18:49

Оправих се, lock.
The Best Deathrun Server: 79.124.49.91:27019
The Best Respawn Server: 79.124.49.88:27021

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

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

Кой е на линия

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