diff --git a/reapi/extra/amxmodx/scripting/include/cssdk_const.inc b/reapi/extra/amxmodx/scripting/include/cssdk_const.inc index 31a73e0f..39c21799 100644 --- a/reapi/extra/amxmodx/scripting/include/cssdk_const.inc +++ b/reapi/extra/amxmodx/scripting/include/cssdk_const.inc @@ -13,6 +13,8 @@ #define MAX_WEAPONS 32 #define MAX_CLIENTS 32 // Max # of clients allowed in a server. #define MAX_ITEM_TYPES 6 // hud item selection slots +#define MAX_AMMO_SLOTS 32 // not really slots +#define MAX_ITEMS 4 // hard coded item types #define MAX_EDICT_BITS 11 // How many bits to use to encode an edict. # of bits needed to represent max edicts #define MAX_EDICTS (1< #define is_user_steam(%0) (REU_GetAuthtype(%0) == CA_TYPE_STEAM) @@ -51,6 +37,57 @@ native client_auth_type:REU_GetAuthtype(const index); */ native REU_GetAuthKey(const index, dest[], maxlen); +/* +* Gets client authkey kind. +* +* @param index Client index +* +* @return Authkey kind, see enum reu_authkey_kind (REU_AK_*) +*/ +native reu_authkey_kind:REU_GetAuthKeyKind(const index); + +/* +* Sets the client connect time. +* +* @param index Client index +* @param time Connect time to set +* +* @return 1 on success +*/ +native REU_SetConnectTime(const index, const Float:time); + +/* +* Gets the client serialized SteamID. +* +* @param index Client index +* @param type Variable to store the id type in, see enum AuthIdType (AUTH_IDTYPE_*) +* @param authid Buffer to copy the serialized id to (at least 64 cells) +* +* @return true on success, false if the client has no serialized id +*/ +native bool:REU_GetSerializedId(const index, &AuthIdType:type, authid[]); + +/* +* Gets the client storage SteamID. +* +* @param index Client index +* @param type Variable to store the id type in, see enum AuthIdType (AUTH_IDTYPE_*) +* @param authid Buffer to copy the storage id to (at least 64 cells) +* +* @return true on success, false if the client has no storage id +*/ +native bool:REU_GetStorageId(const index, &AuthIdType:type, authid[]); + +/* +* Gets the client display SteamID. +* +* @param index Client index +* +* @return Display SteamID as a 64-bit value truncated to a 32-bit cell +* @note For the full id use REU_GetSerializedId/REU_GetStorageId +*/ +native REU_GetDisplaySteamId(const index); + /* * Check if the client is running RevEmu with limited user rights. * diff --git a/reapi/extra/amxmodx/scripting/include/reapi_reunion_const.inc b/reapi/extra/amxmodx/scripting/include/reapi_reunion_const.inc new file mode 100644 index 00000000..da26e66d --- /dev/null +++ b/reapi/extra/amxmodx/scripting/include/reapi_reunion_const.inc @@ -0,0 +1,62 @@ +#if defined _reapi_reunion_const_included + #endinput +#endif + +#define _reapi_reunion_const_included + +/** +* Client auth type +* +* @see REU_GetAuthtype() +* @note Mirrors reunion's enum dp_authkind_e (reunion_api.h), +* extended with CA_TYPE_SSE3 (value 11) +*/ +enum client_auth_type +{ + CA_TYPE_NONE = 0, + CA_TYPE_DPROTO, + CA_TYPE_STEAM, + CA_TYPE_STEAMEMU, + CA_TYPE_REVEMU, + CA_TYPE_OLDREVEMU, + CA_TYPE_HLTV, + CA_TYPE_SC2009, + CA_TYPE_AVSMP, + CA_TYPE_SXEI, + CA_TYPE_REVEMU2013, + CA_TYPE_SSE3, +}; + +/** +* Authkey kind +* +* @see REU_GetAuthKeyKind() +* @note Mirrors reunion's enum reu_authkey_kind (reunion_api.h); +* REU_AK_MAX is a sentinel and is not exposed +*/ +enum reu_authkey_kind +{ + REU_AK_UNKNOWN = -1, + REU_AK_STEAM, + REU_AK_VOLUMEID, + REU_AK_HDDSN, + REU_AK_FILEID, + REU_AK_SXEID, + REU_AK_OTHER, +}; + +/** +* Auth id type +* +* @see REU_GetSerializedId(), REU_GetStorageId() +* @note Mirrors ReHLDS's enum AUTH_IDTYPE +* (rehlds/public/rehlds/userid_rehlds.h) - the +* USERID_t::idtype field written by the natives above +*/ +enum AuthIdType +{ + AUTH_IDTYPE_UNKNOWN = 0, + AUTH_IDTYPE_STEAM, + AUTH_IDTYPE_VALVE, + AUTH_IDTYPE_LOCAL, +}; diff --git a/reapi/extra/amxmodx/scripting/include/reapi_vtc.inc b/reapi/extra/amxmodx/scripting/include/reapi_vtc.inc index 98e3aae1..2b5c3a16 100644 --- a/reapi/extra/amxmodx/scripting/include/reapi_vtc.inc +++ b/reapi/extra/amxmodx/scripting/include/reapi_vtc.inc @@ -43,7 +43,7 @@ native bool:VTC_IsClientMuted(const index); * Play the audio file via the voice stream. * * @param receiver Receiver index -* @param soundFilePath The path to the sound file +* @param soundFilePath The path to the sound file, relative to the game directory; must be a valid PCM WAV file (8 or 16 bit) * * @note Usage example: * VTC_PlaySound(id, "sound/ambience/Opera.wav"); diff --git a/reapi/src/natives/natives_common.cpp b/reapi/src/natives/natives_common.cpp index b538c14a..699f79eb 100644 --- a/reapi/src/natives/natives_common.cpp +++ b/reapi/src/natives/natives_common.cpp @@ -146,11 +146,11 @@ cell AMX_NATIVE_CALL amx_set_key_value_buffer(AMX *amx, cell *params) /* * Gets an AMXX string buffer from a infobuffer pointer * -* @param buffer Info string pointer -* @param value String to copy value to +* @param pbuffer Info string pointer +* @param output String to copy value to * @param maxlen Maximum size of the output buffer * -* @return Returns a string buffer on infobuffer pointer +* @return Number of cells written to the output buffer * * native get_key_value_buffer(const pbuffer, const output[], const maxlen); */ @@ -313,13 +313,12 @@ cell AMX_NATIVE_CALL amx_GetAttachment(AMX *amx, cell *params) } /* -* Sets body group value based on entity's model group +* Gets body group value based on entity's model group * * @param entity Entity index * @param group Number of entity's model group index -* @param value Value to assign * -* @return 1 on success, 0 otherwise +* @return Body group value * @error If the index is not within the range of 1 to maxEntities or * the entity is not valid, an error will be thrown. * @@ -345,12 +344,13 @@ cell AMX_NATIVE_CALL amx_GetBodygroup(AMX *amx, cell *params) } /* -* Gets body group value based on entity's model group +* Sets body group value based on entity's model group * * @param entity Entity index * @param group Number of entity's model group index +* @param value Value to assign * -* @return Body group value +* @return 1 on success, 0 otherwise * @error If the index is not within the range of 1 to maxEntities or * the entity is not valid, an error will be thrown. * diff --git a/reapi/src/natives/natives_misc.cpp b/reapi/src/natives/natives_misc.cpp index 4e813bea..493408a8 100644 --- a/reapi/src/natives/natives_misc.cpp +++ b/reapi/src/natives/natives_misc.cpp @@ -3620,7 +3620,7 @@ enum MapNameType { MNT_TRUE, MNT_SET }; * @param output Buffer to copy map name to * @param len Maximum buffer size * @param type MNT_SET will return the name of the current map -* MNT_TRUE will return the original map name independant of the name set with via rh_set_mapname +* MNT_TRUE will return the original map name independent of the name set via rh_set_mapname * * @noreturn *