Skip to content

Commit

Permalink
Merge pull request #16 from Giferns/patch-1
Browse files Browse the repository at this point in the history
Update reapi_healthnade.sma
  • Loading branch information
Giferns authored Sep 12, 2024
2 parents 6b8734a + 65297a6 commit 2afefc2
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions amxmodx/scripting/reapi_healthnade.sma
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@
give_healthnade #%userid% кол-во
либо
give_healthnade %id% кол-во
0.0.19f (12.09.2024)
* Исправление положения функции srvcmd_GiveHealthnade
*/

new const PLUGIN_VERSION[] = "0.0.18f";
new const PLUGIN_VERSION[] = "0.0.19f";

#pragma semicolon 1

Expand Down Expand Up @@ -230,23 +232,6 @@ public RegUserMsg_Post(const name[]) {
}
}

public srvcmd_GiveHealthnade() {
enum { player = 1, count };

new szArg[32], pPlayer; read_argv(player, szArg, charsmax(szArg));

if(szArg[0] == '#') {
pPlayer = find_player("k", str_to_num(szArg[1]));
}
else {
pPlayer = str_to_num(szArg);
}

new iCount = max(1, read_argv_int(count));
giveNade(pPlayer, iCount, iCount);
return PLUGIN_HANDLED;
}

public HookWeaponList(const msg_id, const msg_dest, const msg_entity) {
enum {
arg_name = 1,
Expand Down Expand Up @@ -277,6 +262,23 @@ public HookWeaponList(const msg_id, const msg_dest, const msg_entity) {
}
#endif

public srvcmd_GiveHealthnade() {
enum { player = 1, count };

new szArg[32], pPlayer; read_argv(player, szArg, charsmax(szArg));

if(szArg[0] == '#') {
pPlayer = find_player("k", str_to_num(szArg[1]));
}
else {
pPlayer = str_to_num(szArg);
}

new iCount = max(1, read_argv_int(count));
giveNade(pPlayer, iCount, iCount);
return PLUGIN_HANDLED;
}

public CBasePlayer_OnSpawnEquip_Post(const id) {
remove_task(id);

Expand Down

0 comments on commit 2afefc2

Please sign in to comment.