2
0
mirror of https://github.com/rehlds/reapi.git synced 2025-01-14 23:58:08 +03:00

Fixed startPercent argument type for native rg_send_bartime2

This commit is contained in:
s1lentq 2023-11-22 10:19:59 +07:00
parent 1a72c8a45c
commit 11ead5d3b6
2 changed files with 6 additions and 5 deletions

View File

@ -868,7 +868,7 @@ native rg_send_bartime(const index, const duration, const bool:observer = true);
*
* @noreturn
*/
native rg_send_bartime2(const index, const duration, const startPercent, const bool:observer = true);
native rg_send_bartime2(const index, const duration, const Float:startPercent, const bool:observer = true);
/*
* Sends the SendAudio message - plays the specified audio.
@ -901,7 +901,7 @@ native rg_get_iteminfo(const ent, ItemInfo:type, any:...);
/**
* Sets a parameter of the global CBasePlayerItem::m_ItemInfoArray array
* @note To have effect on client side (i.g. ammo size on HUD) you should
* @note To have effect on client side (i.g. ammo size on HUD) you should
* alter this value BEFORE WeaponList message is sent to client, or
* force it's alteration by sending again to the specific client.
* Hooking WeaponList message with AMXX's register_message is a choice.

View File

@ -2014,7 +2014,7 @@ cell AMX_NATIVE_CALL rg_send_bartime(AMX *amx, cell *params)
*
* @noreturn
*
* native rg_send_bartime2(const index, const duration, const startPercent, const bool:observer = true);
* native rg_send_bartime2(const index, const duration, const Float:startPercent, const bool:observer = true);
*/
cell AMX_NATIVE_CALL rg_send_bartime2(AMX *amx, cell *params)
{
@ -2024,15 +2024,16 @@ cell AMX_NATIVE_CALL rg_send_bartime2(AMX *amx, cell *params)
CHECK_CONNECTED(pPlayer, arg_index);
CAmxArgs args(amx, params);
float startPercent = args[arg_start_percent];
if (!args[arg_observer]) {
EMESSAGE_BEGIN(MSG_ONE_UNRELIABLE, gmsgBarTime2, nullptr, pPlayer->edict());
EWRITE_SHORT(args[arg_time]);
EWRITE_SHORT(args[arg_start_percent]);
EWRITE_SHORT(startPercent);
EMESSAGE_END();
return TRUE;
}
pPlayer->CSPlayer()->SetProgressBarTime2(args[arg_time], args[arg_start_percent]);
pPlayer->CSPlayer()->SetProgressBarTime2(args[arg_time], startPercent);
return TRUE;
}