mirror of
https://github.com/rehlds/reapi.git
synced 2025-01-16 00:28:17 +03:00
Refactoring amxx-cssdk
This commit is contained in:
parent
15efb24d1c
commit
a8ea223a51
File diff suppressed because it is too large
Load Diff
7
reapi/extra/amxmodx/scripting/include/hlsdk_const.inc
Normal file
7
reapi/extra/amxmodx/scripting/include/hlsdk_const.inc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#if defined _hlsdk_const_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _hlsdk_const_included
|
||||||
|
|
||||||
|
// Counter-Strike SDK Constants
|
||||||
|
#include <cssdk_const.inc>
|
@ -43,18 +43,18 @@ enum members_tables_e
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Is like FNullEnt
|
// Is like FNullEnt
|
||||||
#define is_nullent(%0) (%0 == 0 || is_entity(%0) == false)
|
#define is_nullent(%0) (%0 == 0 || is_entity(%0) == false)
|
||||||
|
|
||||||
#define MAX_REGION_RANGE 1024
|
#define MAX_REGION_RANGE 1024
|
||||||
|
|
||||||
#define BEGIN_FUNC_REGION(%0) (any:MAX_REGION_RANGE * hooks_tables_e:ht_%0)
|
#define BEGIN_FUNC_REGION(%0) (any:MAX_REGION_RANGE * hooks_tables_e:ht_%0)
|
||||||
#define BEGIN_MEMBER_REGION(%0) (any:MAX_REGION_RANGE * members_tables_e:mt_%0)
|
#define BEGIN_MEMBER_REGION(%0) (any:MAX_REGION_RANGE * members_tables_e:mt_%0)
|
||||||
|
|
||||||
#include <cssdk_const>
|
#include <cssdk_const>
|
||||||
|
|
||||||
#include <reapi_version>
|
#include <reapi_version>
|
||||||
#include <reapi_engine> // NOTE: only for ReHLDS
|
#include <reapi_engine> // @note: only for ReHLDS
|
||||||
#include <reapi_gamedll> // NOTE: only for gamedll Counter-Strike (ReGameDLL_CS)
|
#include <reapi_gamedll> // @note: only for gamedll Counter-Strike (ReGameDLL_CS)
|
||||||
|
|
||||||
// addons
|
// addons
|
||||||
#include <reapi_vtc>
|
#include <reapi_vtc>
|
||||||
@ -64,10 +64,10 @@ enum members_tables_e
|
|||||||
// hookchain return type
|
// hookchain return type
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
HC_CONTINUE = 0, // Plugin didn't take any action
|
HC_CONTINUE = 0, // Plugin didn't take any action
|
||||||
HC_SUPERCEDE, // Skip real function, use my return value
|
HC_SUPERCEDE, // Skip real function, use my return value
|
||||||
HC_BREAK // Skip all forwards and real function, use my return value
|
HC_BREAK // Skip all forwards and real function, use my return value
|
||||||
// @note Warning: Be very careful, using this type of return will skip calls for all following AMXX plugins
|
// @note Warning: Be very careful, using this type of return will skip calls for all following AMXX plugins
|
||||||
};
|
};
|
||||||
|
|
||||||
// hookchain types
|
// hookchain types
|
||||||
@ -89,10 +89,11 @@ enum HookChain
|
|||||||
* Hook API function that are available into enum.
|
* Hook API function that are available into enum.
|
||||||
* Look at the enums for parameter lists.
|
* Look at the enums for parameter lists.
|
||||||
*
|
*
|
||||||
* @param function The function to hook
|
* @param function The function to hook
|
||||||
* @param callback The forward to call
|
* @param callback The forward to call
|
||||||
* @param post Whether or not to forward this in post
|
* @param post Whether or not to forward this in post
|
||||||
* @return Returns a hook handle. Use EnableHookChain/DisableHookChain to toggle the forward on or off
|
*
|
||||||
|
* @return Returns a hook handle. Use EnableHookChain/DisableHookChain to toggle the forward on or off
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native HookChain:RegisterHookChain({EngineFunc, GamedllFunc, GamedllFunc_CBaseAnimating, GamedllFunc_CBasePlayer, GamedllFunc_CSGameRules, ReCheckerFunc}:function_id, const callback[], post = 0);
|
native HookChain:RegisterHookChain({EngineFunc, GamedllFunc, GamedllFunc_CBaseAnimating, GamedllFunc_CBasePlayer, GamedllFunc_CSGameRules, ReCheckerFunc}:function_id, const callback[], post = 0);
|
||||||
@ -101,7 +102,7 @@ native HookChain:RegisterHookChain({EngineFunc, GamedllFunc, GamedllFunc_CBaseAn
|
|||||||
* Stops a hook from triggering.
|
* Stops a hook from triggering.
|
||||||
* Use the return value from RegisterHookChain as the parameter here!
|
* Use the return value from RegisterHookChain as the parameter here!
|
||||||
*
|
*
|
||||||
* @param hook The hook to stop
|
* @param hook The hook to stop
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:DisableHookChain(HookChain:hook);
|
native bool:DisableHookChain(HookChain:hook);
|
||||||
@ -110,8 +111,9 @@ native bool:DisableHookChain(HookChain:hook);
|
|||||||
* Starts a hook back up.
|
* Starts a hook back up.
|
||||||
* Use the return value from RegisterHookChain as the parameter here!
|
* Use the return value from RegisterHookChain as the parameter here!
|
||||||
*
|
*
|
||||||
* @param hook The hook to re-enable
|
* @param hook The hook to re-enable
|
||||||
* @return Returns true if the function is successfully executed, otherwise false
|
*
|
||||||
|
* @return Returns true if the function is successfully executed, otherwise false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:EnableHookChain(HookChain:hook);
|
native bool:EnableHookChain(HookChain:hook);
|
||||||
@ -119,8 +121,8 @@ native bool:EnableHookChain(HookChain:hook);
|
|||||||
/*
|
/*
|
||||||
* Sets the return value of a hookchain.
|
* Sets the return value of a hookchain.
|
||||||
*
|
*
|
||||||
* @param type To specify the ATYPE_* parameter, look at the enum AType
|
* @param type To specify the ATYPE_* parameter, look at the enum AType
|
||||||
* @param value The value to set the return to
|
* @param value The value to set the return to
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native SetHookChainReturn(AType:type, any:...);
|
native SetHookChainReturn(AType:type, any:...);
|
||||||
@ -129,9 +131,10 @@ native SetHookChainReturn(AType:type, any:...);
|
|||||||
* Gets the return value of the current hookchain.
|
* Gets the return value of the current hookchain.
|
||||||
* This has no effect in pre hookchain.
|
* This has no effect in pre hookchain.
|
||||||
*
|
*
|
||||||
* @param type To specify the ATYPE_* parameter, look at the enum AType
|
* @param type To specify the ATYPE_* parameter, look at the enum AType
|
||||||
* @param [maxlen] Max length of string (optional)
|
* @param [maxlen] Max length of string (optional)
|
||||||
* @return If an integer or boolean or one byte or float, array or everything else is passed via 1st argument and more
|
*
|
||||||
|
* @return If an integer or boolean or one byte or float, array or everything else is passed via 1st argument and more
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native any:GetHookChainReturn(AType:type, any:...);
|
native any:GetHookChainReturn(AType:type, any:...);
|
||||||
@ -140,10 +143,11 @@ native any:GetHookChainReturn(AType:type, any:...);
|
|||||||
* Set hookchain argument.
|
* Set hookchain argument.
|
||||||
* This has no effect in post hookchain.
|
* This has no effect in post hookchain.
|
||||||
*
|
*
|
||||||
* @param number Number of argument
|
* @param number Number of argument
|
||||||
* @param value New value
|
* @param value New value
|
||||||
* @param [maxlen] Max length of string (optional)
|
* @param [maxlen] Max length of string (optional)
|
||||||
* @return Returns true if the function is successfully executed, otherwise false
|
*
|
||||||
|
* @return Returns true if the function is successfully executed, otherwise false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native SetHookChainArg(number, AType:type, any:...);
|
native SetHookChainArg(number, AType:type, any:...);
|
||||||
@ -152,7 +156,7 @@ native SetHookChainArg(number, AType:type, any:...);
|
|||||||
* Compares the entity to a specified classname.
|
* Compares the entity to a specified classname.
|
||||||
* @note This native also checks the validity of an entity.
|
* @note This native also checks the validity of an entity.
|
||||||
*
|
*
|
||||||
* @return true/false
|
* @return true/false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:FClassnameIs(const entityIndex, const className[]);
|
native bool:FClassnameIs(const entityIndex, const className[]);
|
||||||
@ -179,7 +183,7 @@ native engset_view(const index, const const viewEntity);
|
|||||||
/*
|
/*
|
||||||
* Gets the return index of the current view entity on a client.
|
* Gets the return index of the current view entity on a client.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native get_viewent(const index);
|
native get_viewent(const index);
|
||||||
@ -187,7 +191,7 @@ native get_viewent(const index);
|
|||||||
/*
|
/*
|
||||||
* Check if the entity is valid.
|
* Check if the entity is valid.
|
||||||
*
|
*
|
||||||
* @return true/false
|
* @return true/false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:is_entity(const entityIndex);
|
native bool:is_entity(const entityIndex);
|
||||||
@ -195,7 +199,7 @@ native bool:is_entity(const entityIndex);
|
|||||||
/*
|
/*
|
||||||
* Check if ReHLDS is available.
|
* Check if ReHLDS is available.
|
||||||
*
|
*
|
||||||
* @return true/false
|
* @return true/false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:is_rehlds();
|
native bool:is_rehlds();
|
||||||
@ -203,7 +207,7 @@ native bool:is_rehlds();
|
|||||||
/*
|
/*
|
||||||
* Check if ReGameDLL is available.
|
* Check if ReGameDLL is available.
|
||||||
*
|
*
|
||||||
* @return true/false
|
* @return true/false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:is_regamedll();
|
native bool:is_regamedll();
|
||||||
@ -211,7 +215,7 @@ native bool:is_regamedll();
|
|||||||
/*
|
/*
|
||||||
* Check if Reunion is available.
|
* Check if Reunion is available.
|
||||||
*
|
*
|
||||||
* @return true/false
|
* @return true/false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:has_reunion();
|
native bool:has_reunion();
|
||||||
@ -219,7 +223,7 @@ native bool:has_reunion();
|
|||||||
/*
|
/*
|
||||||
* Check if VTC is available.
|
* Check if VTC is available.
|
||||||
*
|
*
|
||||||
* @return true/false
|
* @return true/false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:has_vtc();
|
native bool:has_vtc();
|
||||||
@ -227,7 +231,7 @@ native bool:has_vtc();
|
|||||||
/*
|
/*
|
||||||
* Check if Rechecker is available.
|
* Check if Rechecker is available.
|
||||||
*
|
*
|
||||||
* @return true/false
|
* @return true/false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:has_rechecker();
|
native bool:has_rechecker();
|
||||||
|
@ -1,111 +0,0 @@
|
|||||||
#if defined _reapi_addons_included
|
|
||||||
#endinput
|
|
||||||
#endif
|
|
||||||
#define _reapi_addons_included
|
|
||||||
|
|
||||||
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,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define is_user_steam(%0) (REU_GetAuthtype(%0) == CA_TYPE_STEAM)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Checks whether the player is talking at the moment.
|
|
||||||
*
|
|
||||||
* @param index Client index
|
|
||||||
* @return true if client is speaking, false otherwise
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
native bool:VTC_IsClientSpeaking(const index);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Mutes the player.
|
|
||||||
*
|
|
||||||
* @param index Client index
|
|
||||||
* @noreturn
|
|
||||||
*/
|
|
||||||
native VTC_MuteClient(const index);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Unmutes the player.
|
|
||||||
*
|
|
||||||
* @param index Client index
|
|
||||||
* @noreturn
|
|
||||||
*/
|
|
||||||
native VTC_UnmuteClient(const index);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Checks whether the player is muted at the moment.
|
|
||||||
*
|
|
||||||
* @param index Client index
|
|
||||||
* @return true if client is muted, false otherwise
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
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
|
|
||||||
*
|
|
||||||
* @note Usage example:
|
|
||||||
* VTC_PlaySound(id, "sound/ambience/Opera.wav");
|
|
||||||
*
|
|
||||||
* @noreturn
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
native VTC_PlaySound(const receiver, const soundFilePath[]);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Called when the player started talking.
|
|
||||||
*
|
|
||||||
* @param index Client index
|
|
||||||
* @noreturn
|
|
||||||
*/
|
|
||||||
forward VTC_OnClientStartSpeak(const index);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Called when the player stopped talking.
|
|
||||||
*
|
|
||||||
* @param index Client index
|
|
||||||
* @noreturn
|
|
||||||
*/
|
|
||||||
forward VTC_OnClientStopSpeak(const index);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Gets client protocol.
|
|
||||||
*
|
|
||||||
* @param index Client index
|
|
||||||
* @return Client protocol
|
|
||||||
*/
|
|
||||||
native REU_GetProtocol(const index);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Gets client auth type.
|
|
||||||
*
|
|
||||||
* @param index Client index
|
|
||||||
* @return Client auth type
|
|
||||||
*/
|
|
||||||
native client_auth_type:REU_GetAuthtype(const index);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check if the client is running RevEmu with limited user rights.
|
|
||||||
*
|
|
||||||
* @param index Client index
|
|
||||||
* @return 1/0
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
native bool:REU_IsRevemuWithoutAdminRights(const index);
|
|
File diff suppressed because it is too large
Load Diff
@ -9,18 +9,18 @@
|
|||||||
/*
|
/*
|
||||||
* Sets a value to CSGameRules_Members members.
|
* Sets a value to CSGameRules_Members members.
|
||||||
*
|
*
|
||||||
* @param member The specified member, look at the enums with name CSGameRules_Members
|
* @param member The specified member, look at the enums with name CSGameRules_Members
|
||||||
*
|
*
|
||||||
* @return 1 on success.
|
* @return 1 on success.
|
||||||
*/
|
*/
|
||||||
native set_member_game(CSGameRules_Members:member, any:...);
|
native set_member_game(CSGameRules_Members:member, any:...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns a value from CSGameRules_Members members
|
* Returns a value from CSGameRules_Members members
|
||||||
*
|
*
|
||||||
* @param member The specified member, look at the enums with name CSGameRules_Members
|
* @param member The specified member, look at the enums with name CSGameRules_Members
|
||||||
*
|
*
|
||||||
* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified member
|
* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified member
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native any:get_member_game(CSGameRules_Members:member, any:...);
|
native any:get_member_game(CSGameRules_Members:member, any:...);
|
||||||
@ -28,10 +28,10 @@ native any:get_member_game(CSGameRules_Members:member, any:...);
|
|||||||
/*
|
/*
|
||||||
* Sets a value to an entity's member.
|
* Sets a value to an entity's member.
|
||||||
*
|
*
|
||||||
* @param index Entity index
|
* @param index Entity index
|
||||||
* @param member The specified member, look at the enums with name *_Members
|
* @param member The specified member, look at the enums with name *_Members
|
||||||
*
|
*
|
||||||
* @return 1 on success.
|
* @return 1 on success.
|
||||||
*/
|
*/
|
||||||
native set_member(const index, {CBaseEntity_Members, CBaseAnimating_Members, CBaseMonster_Members,
|
native set_member(const index, {CBaseEntity_Members, CBaseAnimating_Members, CBaseMonster_Members,
|
||||||
CBasePlayer_Members, CCSPlayer_Members, CBasePlayerItem_Members, CBasePlayerWeapon_Members,
|
CBasePlayer_Members, CCSPlayer_Members, CBasePlayerItem_Members, CBasePlayerWeapon_Members,
|
||||||
@ -40,10 +40,10 @@ native set_member(const index, {CBaseEntity_Members, CBaseAnimating_Members, CBa
|
|||||||
/*
|
/*
|
||||||
* Returns a value from an entity's member.
|
* Returns a value from an entity's member.
|
||||||
*
|
*
|
||||||
* @param index Entity index
|
* @param index Entity index
|
||||||
* @param member The specified member, look at the enums with name *_Members
|
* @param member The specified member, look at the enums with name *_Members
|
||||||
*
|
*
|
||||||
* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified member
|
* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified member
|
||||||
*/
|
*/
|
||||||
native any:get_member(const index, {CBaseEntity_Members, CBaseAnimating_Members, CBaseMonster_Members,
|
native any:get_member(const index, {CBaseEntity_Members, CBaseAnimating_Members, CBaseMonster_Members,
|
||||||
CBasePlayer_Members, CCSPlayer_Members, CBasePlayerItem_Members, CBasePlayerWeapon_Members,
|
CBasePlayer_Members, CCSPlayer_Members, CBasePlayerItem_Members, CBasePlayerWeapon_Members,
|
||||||
@ -52,62 +52,62 @@ native any:get_member(const index, {CBaseEntity_Members, CBaseAnimating_Members,
|
|||||||
/*
|
/*
|
||||||
* Sets playermove var.
|
* Sets playermove var.
|
||||||
*
|
*
|
||||||
* @param var The specified playermove, look at the enum PlayerMove
|
* @param var The specified playermove, look at the enum PlayerMove
|
||||||
*
|
*
|
||||||
* @return 1 on success.
|
* @return 1 on success.
|
||||||
*/
|
*/
|
||||||
native set_pmove(const PlayerMove:var, any:...);
|
native set_pmove(const PlayerMove:var, any:...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns a playermove var.
|
* Returns a playermove var.
|
||||||
*
|
*
|
||||||
* @param var The specified playermove var, look at the enums PlayerMove
|
* @param var The specified playermove var, look at the enums PlayerMove
|
||||||
*
|
*
|
||||||
* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar
|
* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar
|
||||||
*/
|
*/
|
||||||
native any:get_pmove(const PlayerMove:var, any:...);
|
native any:get_pmove(const PlayerMove:var, any:...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sets a movevar value to a playermove.
|
* Sets a movevar value to a playermove.
|
||||||
*
|
*
|
||||||
* @param var The specified mvar, look at the enum MoveVars
|
* @param var The specified mvar, look at the enum MoveVars
|
||||||
*
|
*
|
||||||
* @return 1 on success.
|
* @return 1 on success.
|
||||||
*/
|
*/
|
||||||
native set_movevar(const MoveVars:var, any:...);
|
native set_movevar(const MoveVars:var, any:...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns a movevar value from a playermove.
|
* Returns a movevar value from a playermove.
|
||||||
*
|
*
|
||||||
* @param var The specified mvar, look at the enum MoveVars
|
* @param var The specified mvar, look at the enum MoveVars
|
||||||
*
|
*
|
||||||
* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar
|
* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar
|
||||||
*/
|
*/
|
||||||
native any:get_movevar(const MoveVars:var, any:...);
|
native any:get_movevar(const MoveVars:var, any:...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sets a pmtrace var.
|
* Sets a pmtrace var.
|
||||||
*
|
*
|
||||||
* @param var The specified mvar, look at the enum PMTrace
|
* @param var The specified mvar, look at the enum PMTrace
|
||||||
*
|
*
|
||||||
* @return 1 on success.
|
* @return 1 on success.
|
||||||
*/
|
*/
|
||||||
native set_pmtrace(const tracehandle, const PMTrace:var, any:...);
|
native set_pmtrace(const tracehandle, const PMTrace:var, any:...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns a pmtrace var
|
* Returns a pmtrace var
|
||||||
*
|
*
|
||||||
* @param var The specified mvar, look at the enum PMTrace
|
* @param var The specified mvar, look at the enum PMTrace
|
||||||
*
|
*
|
||||||
* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar
|
* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar
|
||||||
*/
|
*/
|
||||||
native any:get_pmtrace(const tracehandle, const PMTrace:var, any:...);
|
native any:get_pmtrace(const tracehandle, const PMTrace:var, any:...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Assign the number of the player's animation.
|
* Assign the number of the player's animation.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param playerAnim Specific animation number
|
* @param playerAnim Specific animation number
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
@ -116,9 +116,9 @@ native rg_set_animation(const index, PLAYER_ANIM:playerAnim);
|
|||||||
/*
|
/*
|
||||||
* Adds money to player's account.
|
* Adds money to player's account.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param amount The amount of money
|
* @param amount The amount of money
|
||||||
* @param bTrackChange If bTrackChange is 1, the amount of money added will also be displayed.
|
* @param bTrackChange If bTrackChange is 1, the amount of money added will also be displayed.
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
@ -127,18 +127,18 @@ native rg_add_account(const index, amount, AccountSet:typeSet = AS_ADD, const bo
|
|||||||
/*
|
/*
|
||||||
* Gives the player an item.
|
* Gives the player an item.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param pszName Item classname
|
* @param pszName Item classname
|
||||||
* @param type Look at the enums with name GiveType
|
* @param type Look at the enums with name GiveType
|
||||||
*
|
*
|
||||||
* @return Index of entity if successfull, -1 otherwise
|
* @return Index of entity if successfull, -1 otherwise
|
||||||
*/
|
*/
|
||||||
native rg_give_item(const index, const pszName[], GiveType:type = GT_APPEND);
|
native rg_give_item(const index, const pszName[], GiveType:type = GT_APPEND);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Give the default items to a player.
|
* Give the default items to a player.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
@ -147,8 +147,8 @@ native rg_give_default_items(const index);
|
|||||||
/*
|
/*
|
||||||
* Gives the player a shield
|
* Gives the player a shield
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param bDeploy To deploy the shield
|
* @param bDeploy To deploy the shield
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
@ -157,13 +157,13 @@ native rg_give_shield(const index, const bool:bDeploy = true);
|
|||||||
/*
|
/*
|
||||||
* Inflicts damage in a radius from the source position.
|
* Inflicts damage in a radius from the source position.
|
||||||
*
|
*
|
||||||
* @param vecSrc The source position
|
* @param vecSrc The source position
|
||||||
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
|
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
|
||||||
* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner)
|
* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner)
|
||||||
* @param flDamage The amount of damage
|
* @param flDamage The amount of damage
|
||||||
* @param flRadius Damage radius
|
* @param flRadius Damage radius
|
||||||
* @param iClassIgnore To specify classes that are immune to damage
|
* @param iClassIgnore To specify classes that are immune to damage
|
||||||
* @param bitsDamageType Damage type DMG_*
|
* @param bitsDamageType Damage type DMG_*
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
@ -179,8 +179,8 @@ native rg_multidmg_clear();
|
|||||||
/*
|
/*
|
||||||
* Inflicts contents of global multi damage registered on victim.
|
* Inflicts contents of global multi damage registered on victim.
|
||||||
*
|
*
|
||||||
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
|
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
|
||||||
* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner)
|
* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner)
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
@ -189,10 +189,10 @@ native rg_multidmg_apply(const inflictor, const attacker);
|
|||||||
/*
|
/*
|
||||||
* Adds damage to the accumulator.
|
* Adds damage to the accumulator.
|
||||||
*
|
*
|
||||||
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
|
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
|
||||||
* @param victim The victim that takes damage
|
* @param victim The victim that takes damage
|
||||||
* @param flDamage The amount of damage
|
* @param flDamage The amount of damage
|
||||||
* @param bitsDamageType Damage type DMG_*
|
* @param bitsDamageType Damage type DMG_*
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
@ -201,16 +201,16 @@ native rg_multidmg_add(const inflictor, const victim, const Float:flDamage, cons
|
|||||||
/*
|
/*
|
||||||
* Fires bullets from entity.
|
* Fires bullets from entity.
|
||||||
*
|
*
|
||||||
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
|
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
|
||||||
* @param attacker Attacker is the entity that tirggered the damage (such as the gun's owner)
|
* @param attacker Attacker is the entity that tirggered the damage (such as the gun's owner)
|
||||||
* @param shots The number of shots
|
* @param shots The number of shots
|
||||||
* @param vecSrc The source position of the barrel
|
* @param vecSrc The source position of the barrel
|
||||||
* @param vecDirShooting Shooting direction
|
* @param vecDirShooting Shooting direction
|
||||||
* @param vecSpread Spread
|
* @param vecSpread Spread
|
||||||
* @param flDistance Max shot distance
|
* @param flDistance Max shot distance
|
||||||
* @param iBulletType Bullet type, look at the enum with name Bullet in cssdk_const.inc
|
* @param iBulletType Bullet type, look at the enum with name Bullet in cssdk_const.inc
|
||||||
* @param iTracerFreq Tracer frequency
|
* @param iTracerFreq Tracer frequency
|
||||||
* @param iDamage Damage amount
|
* @param iDamage Damage amount
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
@ -219,31 +219,31 @@ native rg_fire_bullets(const inflictor, const attacker, const shots, Float:vecSr
|
|||||||
/*
|
/*
|
||||||
* Fires bullets from player's weapon.
|
* Fires bullets from player's weapon.
|
||||||
*
|
*
|
||||||
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
|
* @param inflictor Inflictor is the entity that caused the damage (such as a gun)
|
||||||
* @param attacker Attacker is the entity that tirggered the damage (such as the gun's owner)
|
* @param attacker Attacker is the entity that tirggered the damage (such as the gun's owner)
|
||||||
* @param vecSrc The source position of the barrel
|
* @param vecSrc The source position of the barrel
|
||||||
* @param vecDirShooting Shooting direction
|
* @param vecDirShooting Shooting direction
|
||||||
* @param vecSpread Spread
|
* @param vecSpread Spread
|
||||||
* @param flDistance Max shot distance
|
* @param flDistance Max shot distance
|
||||||
* @param iPenetration The amount of penetration
|
* @param iPenetration The amount of penetration
|
||||||
* @param iBulletType Bullet type, look at the enum with name Bullet in cssdk_const.inc
|
* @param iBulletType Bullet type, look at the enum with name Bullet in cssdk_const.inc
|
||||||
* @param iDamage Damage amount
|
* @param iDamage Damage amount
|
||||||
* @param flRangeModifier Damage range modifier
|
* @param flRangeModifier Damage range modifier
|
||||||
* @param bPistol Pistol shot
|
* @param bPistol Pistol shot
|
||||||
* @param shared_rand Use player's random seed, get circular gaussian spread
|
* @param shared_rand Use player's random seed, get circular gaussian spread
|
||||||
*
|
*
|
||||||
* @return Float:[3] The spread result
|
* @return Float:[3] The spread result
|
||||||
*/
|
*/
|
||||||
native Float:[3] rg_fire_bullets3(const inflictor, const attacker, Float:vecSrc[3], Float:vecDirShooting[3], const Float:vecSpread, const Float:flDistance, const iPenetration, const Bullet:iBulletType, const iDamage, const Float:flRangeModifier, const bool:bPistol, const shared_rand);
|
native Float:[3] rg_fire_bullets3(const inflictor, const attacker, Float:vecSrc[3], Float:vecDirShooting[3], const Float:vecSpread, const Float:flDistance, const iPenetration, const Bullet:iBulletType, const iDamage, const Float:flRangeModifier, const bool:bPistol, const shared_rand);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Forces the round to end.
|
* Forces the round to end.
|
||||||
*
|
*
|
||||||
* @param tmDelay Delay before the onset of a new round
|
* @param tmDelay Delay before the onset of a new round
|
||||||
* @param st Which team won
|
* @param st Which team won
|
||||||
* @param event The event is the end of the round
|
* @param event The event is the end of the round
|
||||||
* @param message The message on round end
|
* @param message The message on round end
|
||||||
* @param sentence The sound at the end of the round
|
* @param sentence The sound at the end of the round
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
@ -252,9 +252,9 @@ native rg_round_end(const Float:tmDelay, const WinStatus:st, const ScenarioEvent
|
|||||||
/*
|
/*
|
||||||
* Updates current scores.
|
* Updates current scores.
|
||||||
*
|
*
|
||||||
* @param iCtsWins The amount of wins for counter-terrorists
|
* @param iCtsWins The amount of wins for counter-terrorists
|
||||||
* @param iTsWins The amount of wins for terrorists
|
* @param iTsWins The amount of wins for terrorists
|
||||||
* @param bAdd Adds the score to the current amount
|
* @param bAdd Adds the score to the current amount
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
@ -263,11 +263,12 @@ native rg_update_teamscores(const iCtsWins = 0, const iTsWins = 0, const bool:bA
|
|||||||
/*
|
/*
|
||||||
* Creates an entity using Counter-Strike's custom CreateNamedEntity wrapper.
|
* Creates an entity using Counter-Strike's custom CreateNamedEntity wrapper.
|
||||||
*
|
*
|
||||||
* @param classname Entity classname
|
* @param classname Entity classname
|
||||||
* @param useHashTable Use this only for known game entities
|
* @param useHashTable Use this only for known game entities
|
||||||
* NOTE: Do not use this if you use a custom classname
|
|
||||||
*
|
*
|
||||||
* @return Index of the created entity or 0 otherwise
|
* @note: Do not use this if you use a custom classname
|
||||||
|
*
|
||||||
|
* @return Index of the created entity or 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_create_entity(const classname[], const bool:useHashTable = false);
|
native rg_create_entity(const classname[], const bool:useHashTable = false);
|
||||||
@ -275,12 +276,13 @@ native rg_create_entity(const classname[], const bool:useHashTable = false);
|
|||||||
/*
|
/*
|
||||||
* Finds an entity in the world using Counter-Strike's custom FindEntityByString wrapper.
|
* Finds an entity in the world using Counter-Strike's custom FindEntityByString wrapper.
|
||||||
*
|
*
|
||||||
* @param start_index Entity index to start searching from. -1 to start from the first entity
|
* @param start_index Entity index to start searching from. -1 to start from the first entity
|
||||||
* @param classname Classname to search for
|
* @param classname Classname to search for
|
||||||
* @param useHashTable Use this only for known game entities
|
* @param useHashTable Use this only for known game entities
|
||||||
* NOTE: Do not use this if you use a custom classname
|
|
||||||
*
|
*
|
||||||
* @return Entity index > 0 if found, 0 otherwise
|
* @note: Do not use this if you use a custom classname
|
||||||
|
*
|
||||||
|
* @return Entity index > 0 if found, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_find_ent_by_class(start_index, const classname[], const bool:useHashTable = false);
|
native rg_find_ent_by_class(start_index, const classname[], const bool:useHashTable = false);
|
||||||
@ -288,10 +290,10 @@ native rg_find_ent_by_class(start_index, const classname[], const bool:useHashTa
|
|||||||
/*
|
/*
|
||||||
* Finds an entity in the world using Counter-Strike's custom FindEntityByString wrapper, matching by owner.
|
* Finds an entity in the world using Counter-Strike's custom FindEntityByString wrapper, matching by owner.
|
||||||
*
|
*
|
||||||
* @param start_index Entity index to start searching from. -1 to start from the first entity
|
* @param start_index Entity index to start searching from. -1 to start from the first entity
|
||||||
* @param classname Classname to search for
|
* @param classname Classname to search for
|
||||||
*
|
*
|
||||||
* @return 1 if found, 0 otherwise
|
* @return 1 if found, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_find_ent_by_owner(&start_index, const classname[], owner);
|
native rg_find_ent_by_owner(&start_index, const classname[], owner);
|
||||||
@ -299,10 +301,10 @@ native rg_find_ent_by_owner(&start_index, const classname[], owner);
|
|||||||
/*
|
/*
|
||||||
* Finds the weapon by name in the player's inventory.
|
* Finds the weapon by name in the player's inventory.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param weapon Weapon name
|
* @param weapon Weapon name
|
||||||
*
|
*
|
||||||
* @return Weapon's entity index, 0 otherwise
|
* @return Weapon's entity index, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_find_weapon_bpack_by_name(const index, const weapon[]);
|
native rg_find_weapon_bpack_by_name(const index, const weapon[]);
|
||||||
@ -310,10 +312,10 @@ native rg_find_weapon_bpack_by_name(const index, const weapon[]);
|
|||||||
/*
|
/*
|
||||||
* Checks if the player has the item.
|
* Checks if the player has the item.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param item Item name
|
* @param item Item name
|
||||||
*
|
*
|
||||||
* @return true if he does, false otherwise
|
* @return true if he does, false otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:rg_has_item_by_name(const index, const item[]);
|
native bool:rg_has_item_by_name(const index, const item[]);
|
||||||
@ -321,11 +323,11 @@ native bool:rg_has_item_by_name(const index, const item[]);
|
|||||||
/*
|
/*
|
||||||
* Returns specific information about the weapon.
|
* Returns specific information about the weapon.
|
||||||
*
|
*
|
||||||
* @param weapon name or id Weapon id, see WEAPON_* constants, WeaponIdType or weapon_* name
|
* @param weapon name or id Weapon id, see WEAPON_* constants, WeaponIdType or weapon_* name
|
||||||
* @param WpnInfo:type Info type, see WI_* constants
|
* @param WpnInfo:type Info type, see WI_* constants
|
||||||
*
|
*
|
||||||
* @return Weapon information
|
* @return Weapon information
|
||||||
* @error If weapon_id or type are out of bounds, an error will be thrown
|
* @error If weapon_id or type are out of bounds, an error will be thrown
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native any:rg_get_weapon_info(any:...);
|
native any:rg_get_weapon_info(any:...);
|
||||||
@ -333,10 +335,10 @@ native any:rg_get_weapon_info(any:...);
|
|||||||
/*
|
/*
|
||||||
* Sets specific weapon info values.
|
* Sets specific weapon info values.
|
||||||
*
|
*
|
||||||
* @param weapon_id Weapon id, see WEAPON_* constants
|
* @param weapon_id Weapon id, see WEAPON_* constants
|
||||||
* @param type Info type, see WI_* constants
|
* @param type Info type, see WI_* constants
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_set_weapon_info(const {WeaponIdType,_}:weapon_id, WpnInfo:type, any:...);
|
native rg_set_weapon_info(const {WeaponIdType,_}:weapon_id, WpnInfo:type, any:...);
|
||||||
@ -344,10 +346,10 @@ native rg_set_weapon_info(const {WeaponIdType,_}:weapon_id, WpnInfo:type, any:..
|
|||||||
/*
|
/*
|
||||||
* Remove all the player's stuff in a specific slot.
|
* Remove all the player's stuff in a specific slot.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param slot The slot that will be emptied
|
* @param slot The slot that will be emptied
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_remove_items_by_slot(const index, const InventorySlotType:slot);
|
native rg_remove_items_by_slot(const index, const InventorySlotType:slot);
|
||||||
@ -355,10 +357,10 @@ native rg_remove_items_by_slot(const index, const InventorySlotType:slot);
|
|||||||
/*
|
/*
|
||||||
* Drop to floor all the player's stuff by specific slot.
|
* Drop to floor all the player's stuff by specific slot.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param slot Specific slot for remove of each item.
|
* @param slot Specific slot for remove of each item.
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_drop_items_by_slot(const index, const InventorySlotType:slot);
|
native rg_drop_items_by_slot(const index, const InventorySlotType:slot);
|
||||||
@ -366,10 +368,10 @@ native rg_drop_items_by_slot(const index, const InventorySlotType:slot);
|
|||||||
/*
|
/*
|
||||||
* Remove all of the player's items.
|
* Remove all of the player's items.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param removeSuit Remove suit
|
* @param removeSuit Remove suit
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_remove_all_items(const index, const bool:removeSuit = false);
|
native rg_remove_all_items(const index, const bool:removeSuit = false);
|
||||||
@ -377,10 +379,10 @@ native rg_remove_all_items(const index, const bool:removeSuit = false);
|
|||||||
/*
|
/*
|
||||||
* Forces the player to drop the specified item classname.
|
* Forces the player to drop the specified item classname.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param item_name Item classname
|
* @param item_name Item classname
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_drop_item(const index, const item_name[]);
|
native rg_drop_item(const index, const item_name[]);
|
||||||
@ -388,11 +390,11 @@ native rg_drop_item(const index, const item_name[]);
|
|||||||
/*
|
/*
|
||||||
* Executes a client command on the gamedll side.
|
* Executes a client command on the gamedll side.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param command Client command to execute
|
* @param command Client command to execute
|
||||||
* @param arg Optional command arguments
|
* @param arg Optional command arguments
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_internal_cmd(const index, const cmd[], const arg[] = "");
|
native rg_internal_cmd(const index, const cmd[], const arg[] = "");
|
||||||
@ -400,10 +402,10 @@ native rg_internal_cmd(const index, const cmd[], const arg[] = "");
|
|||||||
/*
|
/*
|
||||||
* Removes the specified item classname from the player
|
* Removes the specified item classname from the player
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param item_name Item classname
|
* @param item_name Item classname
|
||||||
*
|
*
|
||||||
* @return 1 if found and remove, 0 otherwise
|
* @return 1 if found and remove, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_remove_item(const index, const item_name[]);
|
native rg_remove_item(const index, const item_name[]);
|
||||||
@ -411,10 +413,10 @@ native rg_remove_item(const index, const item_name[]);
|
|||||||
/*
|
/*
|
||||||
* Returns the amount of ammo in the client's backpack for a specific weapon.
|
* Returns the amount of ammo in the client's backpack for a specific weapon.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param weapon Weapon id
|
* @param weapon Weapon id
|
||||||
*
|
*
|
||||||
* @return Amount of ammo in backpack
|
* @return Amount of ammo in backpack
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_get_user_bpammo(const index, WeaponIdType:weapon);
|
native rg_get_user_bpammo(const index, WeaponIdType:weapon);
|
||||||
@ -422,9 +424,9 @@ native rg_get_user_bpammo(const index, WeaponIdType:weapon);
|
|||||||
/*
|
/*
|
||||||
* Sets the amount of ammo in the client's backpack for a specific weapon.
|
* Sets the amount of ammo in the client's backpack for a specific weapon.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param weapon Weapon id
|
* @param weapon Weapon id
|
||||||
* @param amount New backpack ammo amount to set
|
* @param amount New backpack ammo amount to set
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
@ -434,11 +436,11 @@ native rg_set_user_bpammo(const index, WeaponIdType:weapon, amount);
|
|||||||
/*
|
/*
|
||||||
* Sets the client's defusekit status and allows to set a custom HUD icon and color.
|
* Sets the client's defusekit status and allows to set a custom HUD icon and color.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param defusekit If nonzero the client will have a defusekit, otherwise it will be removed
|
* @param defusekit If nonzero the client will have a defusekit, otherwise it will be removed
|
||||||
* @param color Color RGB
|
* @param color Color RGB
|
||||||
* @param icon HUD sprite to use as an icon
|
* @param icon HUD sprite to use as an icon
|
||||||
* @param flash If nonzero the icon will flash red
|
* @param flash If nonzero the icon will flash red
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
@ -448,10 +450,10 @@ native rg_give_defusekit(const index, const bool:bDefusekit = true, const Float:
|
|||||||
/*
|
/*
|
||||||
* Returns the client's armor value and retrieves the type of armor.
|
* Returns the client's armor value and retrieves the type of armor.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param armortype Variable to store armor type in
|
* @param armortype Variable to store armor type in
|
||||||
*
|
*
|
||||||
* @return Amount of armor, 0 if the client has no armor
|
* @return Amount of armor, 0 if the client has no armor
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_get_user_armor(const index, &ArmorType:armortype);
|
native rg_get_user_armor(const index, &ArmorType:armortype);
|
||||||
@ -459,9 +461,9 @@ native rg_get_user_armor(const index, &ArmorType:armortype);
|
|||||||
/*
|
/*
|
||||||
* Sets the client's armor value and the type of armor.
|
* Sets the client's armor value and the type of armor.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param armorvalue Amount of armor to set
|
* @param armorvalue Amount of armor to set
|
||||||
* @param armortype Armor type to set
|
* @param armortype Armor type to set
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
@ -471,15 +473,15 @@ native rg_set_user_armor(const index, armorvalue, ArmorType:armortype);
|
|||||||
/*
|
/*
|
||||||
* Sets the client's team without killing the player and sets the client's model.
|
* Sets the client's team without killing the player and sets the client's model.
|
||||||
* @note To obtain a TeamName use the following:
|
* @note To obtain a TeamName use the following:
|
||||||
* new TeamName:team = get_member(id, m_iTeam);
|
* new TeamName:team = get_member(id, m_iTeam);
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param team Team id
|
* @param team Team id
|
||||||
* @param model Internal model, use MODEL_AUTO for a random appearance or MODEL_UNASSIGNED to not update it
|
* @param model Internal model, use MODEL_AUTO for a random appearance or MODEL_UNASSIGNED to not update it
|
||||||
*
|
*
|
||||||
* @param send_teaminfo If true, a TeamInfo message will be sent
|
* @param send_teaminfo If true, a TeamInfo message will be sent
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_set_user_team(const index, {TeamName,_}:team, {ModelName,_}:model = MODEL_AUTO, const bool:send_teaminfo = true);
|
native rg_set_user_team(const index, {TeamName,_}:team, {ModelName,_}:model = MODEL_AUTO, const bool:send_teaminfo = true);
|
||||||
@ -487,11 +489,11 @@ native rg_set_user_team(const index, {TeamName,_}:team, {ModelName,_}:model = MO
|
|||||||
/*
|
/*
|
||||||
* Sets the client's player model.
|
* Sets the client's player model.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param model Model name
|
* @param model Model name
|
||||||
* @param update_index If true, the modelindex is updated as well
|
* @param update_index If true, the modelindex is updated as well
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_set_user_model(const index, const model[], const bool:update_index = false);
|
native rg_set_user_model(const index, const model[], const bool:update_index = false);
|
||||||
@ -499,10 +501,10 @@ native rg_set_user_model(const index, const model[], const bool:update_index = f
|
|||||||
/*
|
/*
|
||||||
* Resets the client's model.
|
* Resets the client's model.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param update_index If true, the modelindex is reset as well
|
* @param update_index If true, the modelindex is reset as well
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_reset_user_model(const index, const bool:update_index = false);
|
native rg_reset_user_model(const index, const bool:update_index = false);
|
||||||
@ -510,10 +512,10 @@ native rg_reset_user_model(const index, const bool:update_index = false);
|
|||||||
/*
|
/*
|
||||||
* Enable/Disable player's footsteps.
|
* Enable/Disable player's footsteps.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param silent To enable silent footsteps
|
* @param silent To enable silent footsteps
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_set_user_footsteps(const index, bool:silent = false);
|
native rg_set_user_footsteps(const index, bool:silent = false);
|
||||||
@ -521,9 +523,9 @@ native rg_set_user_footsteps(const index, bool:silent = false);
|
|||||||
/*
|
/*
|
||||||
* Get the current footsteps state of the player.
|
* Get the current footsteps state of the player.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
*
|
*
|
||||||
* @return 1 if the player has silent footsteps, 0 otherwise
|
* @return 1 if the player has silent footsteps, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_get_user_footsteps(const index);
|
native rg_get_user_footsteps(const index);
|
||||||
@ -531,10 +533,10 @@ native rg_get_user_footsteps(const index);
|
|||||||
/*
|
/*
|
||||||
* Transfers C4 from one player to another.
|
* Transfers C4 from one player to another.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param receiver Receiver index, if 0 it will transfer to a random player
|
* @param receiver Receiver index, if 0 it will transfer to a random player
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_transfer_c4(const index, const receiver = 0);
|
native rg_transfer_c4(const index, const receiver = 0);
|
||||||
@ -542,10 +544,10 @@ native rg_transfer_c4(const index, const receiver = 0);
|
|||||||
/*
|
/*
|
||||||
* Instantly reload client's weapons.
|
* Instantly reload client's weapons.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param weapon Weapon entity-index, if 0 then all weapons will be reloaded
|
* @param weapon Weapon entity-index, if 0 then all weapons will be reloaded
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_instant_reload_weapons(const index, const weapon = 0);
|
native rg_instant_reload_weapons(const index, const weapon = 0);
|
||||||
@ -553,8 +555,8 @@ native rg_instant_reload_weapons(const index, const weapon = 0);
|
|||||||
/*
|
/*
|
||||||
* Sets the amount of reward in the game account for all players.
|
* Sets the amount of reward in the game account for all players.
|
||||||
*
|
*
|
||||||
* @param rules_index Look at the enum with name RewardRules
|
* @param rules_index Look at the enum with name RewardRules
|
||||||
* @param amount The money amount
|
* @param amount The money amount
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
@ -564,9 +566,9 @@ native rg_set_account_rules(const RewardRules:rules_index, const amount);
|
|||||||
/*
|
/*
|
||||||
* Gets the specified reward rule's money amount.
|
* Gets the specified reward rule's money amount.
|
||||||
*
|
*
|
||||||
* @param rules_index Look at the enum with name RewardRules
|
* @param rules_index Look at the enum with name RewardRules
|
||||||
*
|
*
|
||||||
* @return The amount of reward
|
* @return The amount of reward
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_get_account_rules(const RewardRules:rules_index);
|
native rg_get_account_rules(const RewardRules:rules_index);
|
||||||
@ -574,7 +576,7 @@ native rg_get_account_rules(const RewardRules:rules_index);
|
|||||||
/*
|
/*
|
||||||
* Checks if the bomb is planted.
|
* Checks if the bomb is planted.
|
||||||
*
|
*
|
||||||
* @return true if the bomb is planted, false otherwise
|
* @return true if the bomb is planted, false otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:rg_is_bomb_planted();
|
native bool:rg_is_bomb_planted();
|
||||||
@ -582,10 +584,10 @@ native bool:rg_is_bomb_planted();
|
|||||||
/*
|
/*
|
||||||
* Forces a player to join a team.
|
* Forces a player to join a team.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param team Team id
|
* @param team Team id
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_join_team(const index, const TeamName:team);
|
native rg_join_team(const index, const TeamName:team);
|
||||||
@ -610,7 +612,7 @@ native rg_swap_all_players();
|
|||||||
* Instantly switches the player to his opposite team.
|
* Instantly switches the player to his opposite team.
|
||||||
* @note Switch from CT to TERRORIST is also opposite.
|
* @note Switch from CT to TERRORIST is also opposite.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
@ -620,10 +622,10 @@ native rg_switch_team(const index);
|
|||||||
/*
|
/*
|
||||||
* Forces the player to switch to a specific weapon.
|
* Forces the player to switch to a specific weapon.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param weapon Weapon entity-index
|
* @param weapon Weapon entity-index
|
||||||
*
|
*
|
||||||
* @return 1 on success, 0 otherwise
|
* @return 1 on success, 0 otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native rg_switch_weapon(const index, const weapon);
|
native rg_switch_weapon(const index, const weapon);
|
||||||
@ -631,7 +633,7 @@ native rg_switch_weapon(const index, const weapon);
|
|||||||
/*
|
/*
|
||||||
* Gets which team has a higher join priority.
|
* Gets which team has a higher join priority.
|
||||||
*
|
*
|
||||||
* @return Returns the Team Name
|
* @return Returns the Team Name
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native TeamName:rg_get_join_team_priority();
|
native TeamName:rg_get_join_team_priority();
|
||||||
@ -639,10 +641,10 @@ native TeamName:rg_get_join_team_priority();
|
|||||||
/*
|
/*
|
||||||
* Checks whether the player can take damage from the attacker.
|
* Checks whether the player can take damage from the attacker.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param attacker Attacker index
|
* @param attacker Attacker index
|
||||||
*
|
*
|
||||||
* @return true if he can take damage, false otherwise
|
* @return true if he can take damage, false otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:rg_is_player_can_takedamage(const index, const attacker);
|
native bool:rg_is_player_can_takedamage(const index, const attacker);
|
||||||
@ -650,9 +652,9 @@ native bool:rg_is_player_can_takedamage(const index, const attacker);
|
|||||||
/*
|
/*
|
||||||
* Gets WeaponIdType from weaponbox
|
* Gets WeaponIdType from weaponbox
|
||||||
*
|
*
|
||||||
* @param entity Weaponbox entity
|
* @param entity Weaponbox entity
|
||||||
*
|
*
|
||||||
* @return return enum of WeaponIdType
|
* @return return enum of WeaponIdType
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native WeaponIdType:rg_get_weaponbox_id(const entity);
|
native WeaponIdType:rg_get_weaponbox_id(const entity);
|
||||||
@ -660,7 +662,7 @@ native WeaponIdType:rg_get_weaponbox_id(const entity);
|
|||||||
/*
|
/*
|
||||||
* Respawn on round for players/bots.
|
* Respawn on round for players/bots.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
@ -670,7 +672,7 @@ native rg_round_respawn(const index);
|
|||||||
/*
|
/*
|
||||||
* Resets player's maxspeed.
|
* Resets player's maxspeed.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
@ -679,11 +681,11 @@ native rg_reset_maxspeed(const index);
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Draws a HUD progress bar which fills from 0% to 100% for the time duration in seconds.
|
* Draws a HUD progress bar which fills from 0% to 100% for the time duration in seconds.
|
||||||
* NOTE: Set the duration to 0 to hide the bar.
|
* @note: Set the duration to 0 to hide the bar.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param time Duration
|
* @param time Duration
|
||||||
* @param observer Send for everyone who is observing the player
|
* @param observer Send for everyone who is observing the player
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
@ -693,10 +695,10 @@ native rg_send_bartime(const index, const duration, const bool:observer = true);
|
|||||||
/*
|
/*
|
||||||
* Same as BarTime, but StartPercent specifies how much of the bar is (already) filled.
|
* Same as BarTime, but StartPercent specifies how much of the bar is (already) filled.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @param time Duration
|
* @param time Duration
|
||||||
* @param startPercent Start percent
|
* @param startPercent Start percent
|
||||||
* @param observer Send for everyone who is observing the player
|
* @param observer Send for everyone who is observing the player
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
@ -706,9 +708,9 @@ native rg_send_bartime2(const index, const duration, const startPercent, const b
|
|||||||
/*
|
/*
|
||||||
* Sends the SendAudio message - plays the specified audio.
|
* Sends the SendAudio message - plays the specified audio.
|
||||||
*
|
*
|
||||||
* @param index Receiver index or use 0 for everyone
|
* @param index Receiver index or use 0 for everyone
|
||||||
* @param sample Sound file to play
|
* @param sample Sound file to play
|
||||||
* @param pitch Sound pitch
|
* @param pitch Sound pitch
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -19,27 +19,32 @@ enum client_auth_type
|
|||||||
CA_TYPE_SSE3,
|
CA_TYPE_SSE3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define is_user_steam(%0) (REU_GetAuthtype(%0) == CA_TYPE_STEAM)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Gets client protocol.
|
* Gets client protocol.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @return Client protocol
|
*
|
||||||
|
* @return Client protocol
|
||||||
*/
|
*/
|
||||||
native REU_GetProtocol(const index);
|
native REU_GetProtocol(const index);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Gets client auth type.
|
* Gets client auth type.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @return Client auth type
|
*
|
||||||
|
* @return Client auth type
|
||||||
*/
|
*/
|
||||||
native client_auth_type:REU_GetAuthtype(const index);
|
native client_auth_type:REU_GetAuthtype(const index);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if the client is running RevEmu with limited user rights.
|
* Check if the client is running RevEmu with limited user rights.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @return 1/0
|
*
|
||||||
|
* @return 1/0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:REU_IsRevemuWithoutAdminRights(const index);
|
native bool:REU_IsRevemuWithoutAdminRights(const index);
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
/*
|
/*
|
||||||
* Checks whether the player is talking at the moment.
|
* Checks whether the player is talking at the moment.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @return true if client is speaking, false otherwise
|
*
|
||||||
|
* @return true if client is speaking, false otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:VTC_IsClientSpeaking(const index);
|
native bool:VTC_IsClientSpeaking(const index);
|
||||||
@ -15,7 +16,8 @@ native bool:VTC_IsClientSpeaking(const index);
|
|||||||
/*
|
/*
|
||||||
* Mutes the player.
|
* Mutes the player.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
native VTC_MuteClient(const index);
|
native VTC_MuteClient(const index);
|
||||||
@ -23,7 +25,8 @@ native VTC_MuteClient(const index);
|
|||||||
/*
|
/*
|
||||||
* Unmutes the player.
|
* Unmutes the player.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
native VTC_UnmuteClient(const index);
|
native VTC_UnmuteClient(const index);
|
||||||
@ -31,8 +34,9 @@ native VTC_UnmuteClient(const index);
|
|||||||
/*
|
/*
|
||||||
* Checks whether the player is muted at the moment.
|
* Checks whether the player is muted at the moment.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
* @return true if client is muted, false otherwise
|
*
|
||||||
|
* @return true if client is muted, false otherwise
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:VTC_IsClientMuted(const index);
|
native bool:VTC_IsClientMuted(const index);
|
||||||
@ -54,7 +58,8 @@ native VTC_PlaySound(const receiver, const soundFilePath[]);
|
|||||||
/*
|
/*
|
||||||
* Called when the player started talking.
|
* Called when the player started talking.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
forward VTC_OnClientStartSpeak(const index);
|
forward VTC_OnClientStartSpeak(const index);
|
||||||
@ -62,7 +67,8 @@ forward VTC_OnClientStartSpeak(const index);
|
|||||||
/*
|
/*
|
||||||
* Called when the player stopped talking.
|
* Called when the player stopped talking.
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
forward VTC_OnClientStopSpeak(const index);
|
forward VTC_OnClientStopSpeak(const index);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user