diff --git a/reapi/extra/amxmodx/scripting/include/reapi_gamedll_const.inc b/reapi/extra/amxmodx/scripting/include/reapi_gamedll_const.inc index 4d9c024..7b4fa7d 100644 --- a/reapi/extra/amxmodx/scripting/include/reapi_gamedll_const.inc +++ b/reapi/extra/amxmodx/scripting/include/reapi_gamedll_const.inc @@ -4280,7 +4280,7 @@ enum CWeaponBox_Members { /* * Description: - - * Member type: class CBasePlayerItem *[6] + * Member type: class CBasePlayerItem *[MAX_ITEM_TYPES] * Get params: get_member(index, member, element); * Set params: set_member(index, member, value, element); */ @@ -4288,15 +4288,15 @@ enum CWeaponBox_Members /* * Description: - - * Member type: string_t [32] - * Get params: get_member(index, member, dest[], const lenght); - * Set params: set_member(index, member, const source[]); + * Member type: string_t [MAX_AMMO_SLOTS] + * Get params: get_member(index, member, dest[], const lenght, element); + * Set params: set_member(index, member, const source[], element); */ m_WeaponBox_rgiszAmmo, /* * Description: - - * Member type: int [32] + * Member type: int [MAX_AMMO_SLOTS] * Get params: get_member(index, member, element); * Set params: set_member(index, member, value, element); */ diff --git a/reapi/src/natives/natives_misc.cpp b/reapi/src/natives/natives_misc.cpp index 687afd1..c1528d7 100644 --- a/reapi/src/natives/natives_misc.cpp +++ b/reapi/src/natives/natives_misc.cpp @@ -400,22 +400,25 @@ cell AMX_NATIVE_CALL rg_round_end(AMX *amx, cell *params) char sentence[190], message[190]; Q_strlcpy(sentence, getAmxString(amx, params[arg_sentence])); - Q_strlcpy(message, getAmxString(amx, params[arg_message])); + Q_strlcpy(message, getAmxString(amx, params[arg_message])); + + const char *_sentence = sentence; + const char *_message = message; if (event != ROUND_NONE) { auto& lst = msg_sentence_list[event]; - if (strcmp(sentence, "default") == 0) - Q_strlcpy(sentence, lst.sentence); + if (strcmp(_sentence, "default") == 0) + _sentence = lst.sentence; if (strcmp(message, "default") == 0) - Q_strlcpy(message, lst.msg); + _message = lst.msg; } - if (sentence[0] != '\0') + if (_sentence[0] != '\0') { - Broadcast(sentence); + Broadcast(_sentence); } - CSGameRules()->EndRoundMessage(message, event); + CSGameRules()->EndRoundMessage(_message, event); CSGameRules()->TerminateRound(CAmxArg(amx, params[arg_delay]), winstatus); return TRUE; }