He Grenade Damage
-
lantimilan
Извън линия - Foreigner
- Мнения: 424
- Регистриран на: 29 Ное 2017, 22:49
- Се отблагодари: 31 пъти
- Получена благодарност: 3 пъти
He Grenade Damage
Hello i want to ask if somebody see different damage from he grenade in regamedll and in rehlds from HLDS, its possible to size in down damage he grenade in rehlds to make same in hlds.
-
atmax
Извън линия - Потребител
- Мнения: 492
- Регистриран на: 22 Мар 2018, 15:06
- Се отблагодари: 37 пъти
- Получена благодарност: 43 пъти
He Grenade Damage
Try explaining better what you want. I just put together some code should work try it. It will increase the damage from a HE Grenade.
Or if you want to reduce the damage try this:
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define DMG_HE (1<<24)
#define IsPlayer(%1) (1<=%1<=MaxPlayers)
new ioid, MaxPlayers
public plugin_init()
{
register_plugin("HE Damage", "1.0", "AMXX-BG Pawn Team")
RegisterHam(Ham_TakeDamage, "player", "TakeDamage", 0)
}
public plugin_cfg()
{
MaxPlayers=get_maxplayers()
}
public TakeDamage(victim, idinflictor, idattacker, Float:damage, damagebits)
{
if(((IsPlayer(idattacker) && is_user_connected(idattacker) && (ioid=idattacker)) ||
(ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid))))
{
if(damagebits & DMG_HE)
{
damage+=10
}
}
}
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define DMG_HE (1<<24)
#define IsPlayer(%1) (1<=%1<=MaxPlayers)
new ioid, MaxPlayers
public plugin_init()
{
register_plugin("HE Damage", "1.0", "AMXX-BG Pawn Team")
RegisterHam(Ham_TakeDamage, "player", "TakeDamage", 0)
}
public plugin_cfg()
{
MaxPlayers=get_maxplayers()
}
public TakeDamage(victim, idinflictor, idattacker, Float:damage, damagebits)
{
if(((IsPlayer(idattacker) && is_user_connected(idattacker) && (ioid=idattacker)) ||
(ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid))))
{
if(damagebits & DMG_HE)
{
damage-=10
}
}
}
Rest in peace my friend I always will remember you!
-
OciXCrom
Извън линия - Администратор
- Мнения: 7206
- Регистриран на: 06 Окт 2016, 19:20
- Местоположение: /resetscore
- Се отблагодари: 117 пъти
- Получена благодарност: 1295 пъти
- Обратна връзка:
He Grenade Damage
That's not how you change arguments in a forward event.
Don't use flat numbers, use modifiers.
Imagine you deal 1 dmg to an an enemy and your code reduces it by -10. What would happen then?
What in the world is "ioid" and what is its purpose in the code?!
Don't use flat numbers, use modifiers.
Imagine you deal 1 dmg to an an enemy and your code reduces it by -10. What would happen then?
What in the world is "ioid" and what is its purpose in the code?!
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define DMG_HE (1<<24)
const Float:HE_DMG_MULTIPLIER = 0.85
public plugin_init()
{
register_plugin("HE Damage", "1.0", "AMXX-BG Pawn Team")
RegisterHam(Ham_TakeDamage, "player", "TakeDamage", 0)
}
public TakeDamage(victim, idinflictor, idattacker, Float:damage, damagebits)
{
if(damagebits & DMG_HE)
{
SetHamParamFloat(4, damage * HE_DMG_MULTIPLIER)
return HAM_OVERRIDE
}
return HAM_IGNORED
}
-
lantimilan
Извън линия - Foreigner
- Мнения: 424
- Регистриран на: 29 Ное 2017, 22:49
- Се отблагодари: 31 пъти
- Получена благодарност: 3 пъти
-
- Подобни теми
- Отговори
- Преглеждания
- Последно мнение
-
- 1 Отговори
- 675 Преглеждания
-
Последно мнение от Siska
-
- 2 Отговори
- 1281 Преглеждания
-
Последно мнение от atmax
-
- 10 Отговори
- 601 Преглеждания
-
Последно мнение от Marinovv
-
- 0 Отговори
- 1311 Преглеждания
-
Последно мнение от USA_CA
-
- 1 Отговори
- 1430 Преглеждания
-
Последно мнение от Siska
-
- 3 Отговори
- 1798 Преглеждания
-
Последно мнение от thoughtz
-
- 1 Отговори
- 1182 Преглеждания
-
Последно мнение от Huehue
Кой е на линия
Потребители разглеждащи този форум: 0 регистрирани и 19 госта