Skip to content
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,13 @@ HealthNade_SlotId "4"
- **fantom** - за исходный плагин [Healthnade](https://dev-cs.ru/resources/992/);
- **AnonymousAmx**, **MayroN**, **Psycrow** - за [модельку гранаты с анимацией](https://dev-cs.ru/threads/18355/);
- **steelzzz**, **wopox1337** - за стоки эффектов.
- **[RedFoxxx](https://dev-cs.ru/members/8560/)** - за перевод на английский язык, за квары HealthNade_ThrowHealingAmount_With_Flags и HealthNade_DrinkHealingAmount_With_Flags.

- **[RedFoxxx](https://dev-cs.ru/members/8560/)** -
1)[за перевод на английский язык]
2)[за квары HealthNade_ThrowHealingAmount_With_Flags и HealthNade_DrinkHealingAmount_With_Flags, HealthNade_Override_AccessFlags и обновлен словарь]
3)[Добавил натив IsPlayer_HealthNade() ]
4)[Добавил console command HealthNade ]
5)[Добавлена функция register_srvcmd("amx_give_HealthNade", "SrvHealthNade", и #include <amxmisc>]

- **[bizon](https://dev-cs.ru/members/4218/)** - за реализацию выпадения гранаты после смерти.
- **[Nordic Warrior](https://dev-cs.ru/members/3093/)** - Добавил натив HealthNade_HasNade
110 changes: 60 additions & 50 deletions amxmodx/scripting/include/healthnade.inc
Original file line number Diff line number Diff line change
@@ -1,50 +1,60 @@
#if defined __healthnade_included
#endinput
#endif
#define __healthnade_included

#define HN_NULLENT -1

#define MAX_PROP_STRING_LEN 128

// Blow radius for throwed nade
#define var_HealthNade_Radius var_fuser1

// Healing amount for throwed nade
#define var_HealthNade_ThrowHealingAmount var_fuser2

// Healing amount for drunk nade
#define var_HealthNade_DrinkHealingAmount var_fuser3

// Prop types for HealthNade_GetProp() forward
enum _:HnPropertiesEnum {
HnProp_DrinkHealingAmount,
HnProp_ThrowHealingAmount,
HnProp_ExplodeRadius
}

// ET_STOP, return > 0 to block internal spawnequip
forward HealthNade_CanEquip(const id);

// ET_STOP, you must return > 0 if you write new prop
// For iPropType see HnPropertiesEnum
// int/float values stored in PropValue, strings/arrays stored in PropString
forward HealthNade_GetProp(const id, const iPropType, &any:PropValue, PropString[MAX_PROP_STRING_LEN]);

/**
* Give health nade with specified parameters to specified player.
*
* @param id Player`s index.
*
* @return HealthNade item index or HN_NULLENT if operation fails.
*/
native HealthNade_GiveNade(const id);

/**
* Checks if the player has HealthNade.
*
* @param id Player`s index.
*
* @return True if the player has a HealthNade, false otherwise.
*/
native bool:HealthNade_HasNade(const id);
#if defined __healthnade_included
#endinput
#endif
#define __healthnade_included

#define HN_NULLENT -1

#define MAX_PROP_STRING_LEN 128

// Blow radius for throwed nade
#define var_HealthNade_Radius var_fuser1

// Healing amount for throwed nade
#define var_HealthNade_ThrowHealingAmount var_fuser2

// Healing amount for drunk nade
#define var_HealthNade_DrinkHealingAmount var_fuser3

// Prop types for HealthNade_GetProp() forward
enum _:HnPropertiesEnum {
HnProp_DrinkHealingAmount,
HnProp_ThrowHealingAmount,
HnProp_ExplodeRadius
}

// ET_STOP, return > 0 to block internal spawnequip
forward HealthNade_CanEquip(const id);

// ET_STOP, you must return > 0 if you write new prop
// For iPropType see HnPropertiesEnum
// int/float values stored in PropValue, strings/arrays stored in PropString
forward HealthNade_GetProp(const id, const iPropType, &any:PropValue, PropString[MAX_PROP_STRING_LEN]);

/**
* Give health nade with specified parameters to specified player.
*
* @param id Player`s index.
*
* @return HealthNade item index or HN_NULLENT if operation fails.
*/
native HealthNade_GiveNade(const id);

/**
* Checks if the player has HealthNade.
*
* @param id Player`s index.
*
* @return True if the player has a HealthNade, false otherwise.
*/
native bool:HealthNade_HasNade(const id);


/**
* Checks if the player has a HealthNade
*
* @param id Player`s index.
*
* @return true/false.
*/
native IsPlayer_HealthNade(const id);
Loading