reapi_addons.inc
Original include source with line numbers.
| 1 | #if defined _reapi_addons_included |
| 2 | #endinput |
| 3 | #endif |
| 4 | #define _reapi_addons_included |
| 5 | |
| 6 | enum client_auth_type |
| 7 | { |
| 8 | CA_TYPE_NONE = 0, |
| 9 | CA_TYPE_DPROTO, |
| 10 | CA_TYPE_STEAM, |
| 11 | CA_TYPE_STEAMEMU, |
| 12 | CA_TYPE_REVEMU, |
| 13 | CA_TYPE_OLDREVEMU, |
| 14 | CA_TYPE_HLTV, |
| 15 | CA_TYPE_SC2009, |
| 16 | CA_TYPE_AVSMP, |
| 17 | CA_TYPE_SXEI, |
| 18 | CA_TYPE_REVEMU2013, |
| 19 | CA_TYPE_SSE3, |
| 20 | }; |
| 21 | |
| 22 | #define is_user_steam(%0) (REU_GetAuthtype(%0) == CA_TYPE_STEAM) |
| 23 | |
| 24 | /* |
| 25 | * Checks whether the player is talking at the moment. |
| 26 | * |
| 27 | * @param index Client index |
| 28 | * |
| 29 | * @return true if client is speaking, false otherwise |
| 30 | * |
| 31 | */ |
| 32 | native bool:VTC_IsClientSpeaking(const index); |
| 33 | |
| 34 | /* |
| 35 | * Mutes the player. |
| 36 | * |
| 37 | * @param index Client index |
| 38 | * |
| 39 | * @noreturn |
| 40 | */ |
| 41 | native VTC_MuteClient(const index); |
| 42 | |
| 43 | /* |
| 44 | * Unmutes the player. |
| 45 | * |
| 46 | * @param index Client index |
| 47 | * |
| 48 | * @noreturn |
| 49 | */ |
| 50 | native VTC_UnmuteClient(const index); |
| 51 | |
| 52 | /* |
| 53 | * Checks whether the player is muted at the moment. |
| 54 | * |
| 55 | * @param index Client index |
| 56 | * @return true if client is muted, false otherwise |
| 57 | * |
| 58 | */ |
| 59 | native bool:VTC_IsClientMuted(const index); |
| 60 | |
| 61 | /* |
| 62 | * Play the audio file via the voice stream. |
| 63 | * |
| 64 | * @param receiver Receiver index |
| 65 | * @param soundFilePath The path to the sound file |
| 66 | * |
| 67 | * @note Usage example: |
| 68 | * VTC_PlaySound(id, "sound/ambience/Opera.wav"); |
| 69 | * |
| 70 | * @noreturn |
| 71 | * |
| 72 | */ |
| 73 | native VTC_PlaySound(const receiver, const soundFilePath[]); |
| 74 | |
| 75 | /* |
| 76 | * Called when the player started talking. |
| 77 | * |
| 78 | * @param index Client index |
| 79 | * @noreturn |
| 80 | */ |
| 81 | forward VTC_OnClientStartSpeak(const index); |
| 82 | |
| 83 | /* |
| 84 | * Called when the player stopped talking. |
| 85 | * |
| 86 | * @param index Client index |
| 87 | * |
| 88 | * @noreturn |
| 89 | */ |
| 90 | forward VTC_OnClientStopSpeak(const index); |
| 91 | |
| 92 | /* |
| 93 | * Gets client protocol. |
| 94 | * |
| 95 | * @param index Client index |
| 96 | * |
| 97 | * @return Client protocol |
| 98 | */ |
| 99 | native REU_GetProtocol(const index); |
| 100 | |
| 101 | /* |
| 102 | * Gets client auth type. |
| 103 | * |
| 104 | * @param index Client index |
| 105 | * |
| 106 | * @return Client auth type |
| 107 | */ |
| 108 | native client_auth_type:REU_GetAuthtype(const index); |
| 109 | |
| 110 | /* |
| 111 | * Check if the client is running RevEmu with limited user rights. |
| 112 | * |
| 113 | * @param index Client index |
| 114 | * |
| 115 | * @return true/false |
| 116 | * |
| 117 | */ |
| 118 | native bool:REU_IsRevemuWithoutAdminRights(const index); |
| 119 | |