Малка добавка към плъгина bullet damage

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
impossible
Извън линия
Потребител
Потребител
Мнения: 488
Регистриран на: 15 Юни 2019, 12:41
Се отблагодари: 23 пъти
Получена благодарност: 47 пъти

Малка добавка към плъгина bullet damage

Мнение от impossible » 18 Сеп 2020, 00:55

Добър вечер, някой ще фиксне ли този плъгин така, че да е достъпен само за играчи с флаг b

също така да има опция за активиране/деактевиране показването на хитове с командата /damager

с опция за оцветяване на съобщението пример:
пишеш /damager - и да изписва // &x01[&x04DAMAGER&x01] Ti uspeshno &x03Aktivira &x01pokazwaneto na hitowete

като напишеш отново /damager - да изписва // &x01[&x04DAMAGER&x01] Ti uspesno &x03Deaktevira &x01pokazwaneto na hitowete

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

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

#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) )
		{
			new iPos = ++g_iPlayerPos[id]
			if( iPos == sizeof(g_flCoords) )
			{
				iPos = g_iPlayerPos[id] = 0
			}
			set_hudmessage(0, 40, 80, Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1)
			show_hudmessage(id, "%d", read_data(2))
		}
	}
}
Предполагам нещо подобно трябва да стане!

} g_isSwitchDmg[id] = (g_isSwitchDmg[id]) ? 0 : 1; num_to_str(g_isSwitchDmg[id], g_szText, charsmax(g_szText)); client_cmd(id, "setinfo _damager %s", g_szText); new szSwitch[20]; format(szSwitch, charsmax(szSwitch), "%s", g_isSwitchDmg[id] ? "Aktivira" : "Deaktevira"); CC_SendMessage(id, "&x01[&x04DAMAGER&x01] Ti uspeshno &x03%s &x01pokazwaneto na hitowete", szSwitch); return PLUGIN_CONTINUE; }

Аватар
impossible
Извън линия
Потребител
Потребител
Мнения: 488
Регистриран на: 15 Юни 2019, 12:41
Се отблагодари: 23 пъти
Получена благодарност: 47 пъти

Малка добавка към плъгина bullet damage

Мнение от impossible » 18 Сеп 2020, 01:22

Забравих да спомена когато обикновен играч без флаг напише командата /damager да му изпише
&x01[&x04VIP EXTRAS&x01] &x01Tazi komanda e samo za VIP igrachi!

Да изглежда по-този начин
image 1.png
image 1.png (1.96 MiB) Преглеждано 2222 пъти
image 1.png
image 1.png (1.96 MiB) Преглеждано 2222 пъти
image 2.png
image 2.png (1.96 MiB) Преглеждано 2222 пъти
image 2.png
image 2.png (1.96 MiB) Преглеждано 2222 пъти
image 3.png
image 3.png (2.85 MiB) Преглеждано 2222 пъти
image 3.png
image 3.png (2.85 MiB) Преглеждано 2222 пъти
} public cmdSwitchDmg(id) { if(!isUserVip(id)) { CC_SendMessage(id, "&x01[&x04VIP EXTRAS&x01] &x01Tazi komanda e samo za VIP igrachi!"); return 0; }
Последно промяна от stambeto2006 на 18 Сеп 2020, 10:12, променено общо 1 път.
Причина: Нарушено е Правило №10 от правилата на форума!

Аватар
gadinkata
Извън линия
Потребител
Потребител
Мнения: 259
Регистриран на: 21 Мар 2018, 12:33
Местоположение: Враца
Се отблагодари: 25 пъти
Получена благодарност: 7 пъти
Обратна връзка:

Малка добавка към плъгина bullet damage

Мнение от gadinkata » 19 Сеп 2020, 22:46

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

/*	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 <cromchat>

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

#define MAX_PLAYERS	32
#define VIP_FLAG ADMIN_BAN

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 b_ShowHuds[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_clcmd("say /damage", "func_hud")
	
	register_clcmd("say_team /damage", "func_hud")

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

	g_iMaxPlayers = get_maxplayers()
}

public client_putinserver(id)
{
	b_ShowHuds[id] = true
}

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) )
		{
			new iPos = ++g_iPlayerPos[id]
			if( iPos == sizeof(g_flCoords) )
			{
				iPos = g_iPlayerPos[id] = 0
			}
			if(b_ShowHuds[id] && is_user_vip(id))
			{
			set_hudmessage(0, 40, 80, Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1)
			show_hudmessage(id, "%d", read_data(2))
			}
		}
	}
}

public func_hud(id)
{
	if(b_ShowHuds[id] && is_user_vip(id))
	{
		b_ShowHuds[id] = false
		CC_SendMessage(id,"Ti &x03Deaktivira &x04Dmg &x04Hits")
		
	}else if(!b_ShowHuds[id] && is_user_vip(id)){
		b_ShowHuds[id] = true
		CC_SendMessage(id,"Ti &x03Aktivira &x04Dmg &x04Hits")
	}else{
		CC_SendMessage(id,"Samo za &x03Vip &x04Igrachi")
	}
}

bool:is_user_vip(id)
	return !!(get_user_flags(id) & VIP_FLAG)


Аватар
impossible
Извън линия
Потребител
Потребител
Мнения: 488
Регистриран на: 15 Юни 2019, 12:41
Се отблагодари: 23 пъти
Получена благодарност: 47 пъти

Малка добавка към плъгина bullet damage

Мнение от impossible » 19 Сеп 2020, 23:17

Браво за сега работи !

Аватар
JackEyedJones
Извън линия
Потребител
Потребител
Мнения: 399
Регистриран на: 10 Сеп 2018, 17:26
Местоположение: Plovdiv, Bulgaria, Europe, Entire World
Се отблагодари: 4 пъти
Получена благодарност: 69 пъти
Обратна връзка:

Малка добавка към плъгина bullet damage

Мнение от JackEyedJones » 20 Сеп 2020, 09:54

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

public func_hud(id)
{
	if(b_ShowHuds[id] && is_user_vip(id))
	{
		b_ShowHuds[id] = false
		CC_SendMessage(id, "Ti &x03Deaktivira &x04Dmg &x04Hits")
		
	}else if(!b_ShowHuds[id] && is_user_vip(id)){
		b_ShowHuds[id] = true
		CC_SendMessage(id, "Ti &x03Aktivira &x04Dmg &x04Hits")
	}else{
		CC_SendMessage(id,"Samo za &x03Vip &x04Igrachi")
	}
}
-- >

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

public func_hud(id)
{
	if(!is_user_vip(id))
	{
		CC_SendMessage(id, "Samo za &x03Vip &x04Igrachi")
		
		return PLUGIN_HANDLED;
	}
	
	b_ShowHuds[id] = b_ShowHuds[id] ? false : true;
	CC_SendMessage(id, "Ti &x03%s &x04Dmg &x04Hits", b_ShowHuds[id] ? "Deaktivira" : "Aktivira");

	return PLUGIN_HANDLED;
}

Аватар
impossible
Извън линия
Потребител
Потребител
Мнения: 488
Регистриран на: 15 Юни 2019, 12:41
Се отблагодари: 23 пъти
Получена благодарност: 47 пъти

Малка добавка към плъгина bullet damage

Мнение от impossible » 21 Сеп 2020, 15:27

img.png
img.png (56.08 KiB) Преглеждано 2003 пъти
img.png
img.png (56.08 KiB) Преглеждано 2003 пъти

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

/*  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 <cromchat>

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

#define MAX_PLAYERS 32
#define VIP_FLAG ADMIN_BAN

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 b_ShowHuds[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_clcmd("say /damager", "func_hud")
    
    register_clcmd("say_team /damager", "func_hud")

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

    g_iMaxPlayers = get_maxplayers()
}

public client_putinserver(id)
{
    b_ShowHuds[id] = true
}

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) )
        {
            new iPos = ++g_iPlayerPos[id]
            if( iPos == sizeof(g_flCoords) )
            {
                iPos = g_iPlayerPos[id] = 0
            }
            if(b_ShowHuds[id] && is_user_vip(id))
            {
            set_hudmessage(0, 40, 80, Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1)
            show_hudmessage(id, "%d", read_data(2))
            }
        }
    }
}

public func_hud(id)
{
    if(!is_user_vip(id))
    {
        CC_SendMessage(id, "&x01[&x04VIP EXTRAS&x01] &x01Tazi komanda e samo za VIP igrachi!")
        
        return PLUGIN_HANDLED;
    }
    
    b_ShowHuds[id] = b_ShowHuds[id] ? false : true;
    CC_SendMessage(id, "Ti uspeshno &x03%s &x01pokazwaneto na hitowete", b_ShowHuds[id] ? "Deaktivira" : "Aktivira");

    return PLUGIN_HANDLED;
}

Аватар
stambeto2006
Извън линия
Модератор
Модератор
Мнения: 505
Регистриран на: 06 Окт 2016, 15:44
Се отблагодари: 53 пъти
Получена благодарност: 45 пъти
Обратна връзка:

Малка добавка към плъгина bullet damage

Мнение от stambeto2006 » 21 Сеп 2020, 15:40

Пробвай сега!
Прикачени файлове
bullet_damage.sma
(1.97 KiB) Свалено 106 пъти
bullet_damage.sma
(1.97 KiB) Свалено 106 пъти

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

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

Кой е на линия

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