The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Lenilson
Извън линия
Foreigner
Foreigner
Мнения: 25
Регистриран на: 11 Сеп 2018, 20:37
Се отблагодари: 5 пъти

The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp

Мнение от Lenilson » 09 Дек 2018, 00:41

Hello, I wanted a plugin that resets frags of the player that dies of knife, this sma that I will send down is resetting the frags when dying of AWP too, and if possible to make the frag reset on time and not the next round, thank you!
Прикачени файлове
knifeReset.sma
(454 Байта) Свалено 121 пъти
knifeReset.sma
(454 Байта) Свалено 121 пъти
Последно промяна от Lenilson на 09 Дек 2018, 02:19, променено общо 1 път.

Аватар
1fRaNkkK
Извън линия
Потребител
Потребител
Мнения: 776
Регистриран на: 09 Окт 2016, 15:21
Се отблагодари: 8 пъти
Получена благодарност: 55 пъти

Help

Мнение от 1fRaNkkK » 09 Дек 2018, 02:17

Fix the title, please.

Аватар
kryder11
Извън линия
Потребител
Потребител
Мнения: 29
Регистриран на: 19 Окт 2016, 05:58
Местоположение: BehindYou
Се отблагодари: 1 път
Получена благодарност: 11 пъти

The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp

Мнение от kryder11 » 09 Дек 2018, 12:30

It is not possible to reset at the moment because if I make it the plugin first reset the frags and the deaths and then add the death of the knife. The result is 0 frags 1 deaths (incorrect)

If you only wish to reset the frags I have not any problem to change it and will be possible to reset at the moment you die of a knife.

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

#include < amxmodx >
#include < cstrike >
#include < fun >
#include < hamsandwich >

new g_iWeaponID;

public plugin_init()
{
	register_plugin( "Reset on Knife", "0.0.3", "AdamRichard21st" );
	RegisterHam(Ham_Killed, "player", "PlayerKilled", 1);
}

public PlayerKilled(victim, attacker, shouldgib)
{
	if(is_user_alive(attacker))
		g_iWeaponID = get_user_weapon(attacker);
	
	if(g_iWeaponID == CSW_KNIFE)
	{
		cs_set_user_deaths  ( victim, 0 );
		set_user_frags      ( victim, 0 );
	}
}

-------------> Only reset frags at the moment you die of a knife

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

#include < amxmodx >
#include < fun >
#include < hamsandwich >

new g_iWeaponID;

public plugin_init()
{
	register_plugin( "Reset on Knife", "0.0.3", "AdamRichard21st" );
	RegisterHam(Ham_Killed, "player", "PlayerKilled", 0);
}

public PlayerKilled(victim, attacker, shouldgib)
{
	if(is_user_alive(attacker))
		g_iWeaponID = get_user_weapon(attacker);
	
	if(g_iWeaponID == CSW_KNIFE)
	{
		set_user_frags( victim, 0 );
	}
}
Site: http://www.olympiagaming.es/serversboard.php
Zombie Apocalypse: 54.37.14.249:27015
4Fun: 54.37.14.249:27016

Аватар
Lenilson
Извън линия
Foreigner
Foreigner
Мнения: 25
Регистриран на: 11 Сеп 2018, 20:37
Се отблагодари: 5 пъти

The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp

Мнение от Lenilson » 11 Дек 2018, 18:33

bug

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp

Мнение от OciXCrom » 12 Дек 2018, 14:13

What?

Аватар
Lenilson
Извън линия
Foreigner
Foreigner
Мнения: 25
Регистриран на: 11 Сеп 2018, 20:37
Се отблагодари: 5 пъти

The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp

Мнение от Lenilson » 14 Дек 2018, 01:47

is clearing the frag when dying with HE

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp

Мнение от OciXCrom » 14 Дек 2018, 14:27

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

#include < amxmodx >
#include < cstrike >
#include < fun >

public plugin_init()
{
    register_plugin( "Reset on Knife", "0.0.3", "AdamRichard21st" );
    register_event( "DeathMsg", "Event_KnifeDeath", "1!2", "4=knife" );
}

public Event_KnifeDeath()
{
    new iVictim = read_data( 2 );
    
    if ( is_user_connected( iVictim ) )
    {
        cs_set_user_deaths  ( iVictim, 0 );
        set_user_frags      ( iVictim, 0 );
    }
}

Аватар
Lenilson
Извън линия
Foreigner
Foreigner
Мнения: 25
Регистриран на: 11 Сеп 2018, 20:37
Се отблагодари: 5 пъти

The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp

Мнение от Lenilson » 17 Дек 2018, 23:19

now it's ok thank you

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

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

Кой е на линия

Потребители разглеждащи този форум: Bing [Bot] и 7 госта