The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp
The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp
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 Байта) Свалено 122 пъти
- knifeReset.sma
- (454 Байта) Свалено 122 пъти
Последно промяна от Lenilson на 09 Дек 2018, 02:19, променено общо 1 път.
-
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
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.
-------------> Only reset frags at the moment you die of a knife
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
Zombie Apocalypse: 54.37.14.249:27015
4Fun: 54.37.14.249:27016
The plugin should reset the frags only when dying of a knife, but it is resetting when dying from awp
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
Код за потвърждение: Избери целия код
#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 );
}
}
-
- Подобни теми
- Отговори
- Преглеждания
- Последно мнение
-
- 2 Отговори
- 360 Преглеждания
-
Последно мнение от Shokub2k
-
- 0 Отговори
- 865 Преглеждания
-
Последно мнение от lantimilan
-
- 7 Отговори
- 2576 Преглеждания
-
Последно мнение от OciXCrom
-
- 1 Отговори
- 936 Преглеждания
-
Последно мнение от Midnight1337
-
- 3 Отговори
- 2365 Преглеждания
-
Последно мнение от OciXCrom
-
- 11 Отговори
- 4529 Преглеждания
-
Последно мнение от OciXCrom
-
- 3 Отговори
- 1452 Преглеждания
-
Последно мнение от atmax
Кой е на линия
Потребители разглеждащи този форум: 0 регистрирани и 15 госта