mirror of
https://github.com/rehlds/reapi.git
synced 2024-12-29 08:05:36 +03:00
Added bypass warning 200 on amxmodx 1.8.2
This commit is contained in:
parent
86aead4b02
commit
9bdeb103eb
@ -44,56 +44,54 @@ enum HookChain
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hook API function that are available into enum
|
* Hook API function that are available into enum
|
||||||
* Look at the enum's for parameter lists.
|
* Look at the enum's 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 handle to the hook. Use EnableHookChain/DisableHookChain to toggle the forward on or off.
|
* @return Returns a handle to the hook. Use EnableHookChain/DisableHookChain to toggle the forward on or off.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native HookChain:RegisterHookChain(any:function_id, const callback[], post = 0);
|
native HookChain:RegisterHookChain(any:function_id, const callback[], post = 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 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);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 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 if the function is successful executed true otherwise false
|
* @return Returns if the function is successful executed true otherwise false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
native bool:EnableHookChain(HookChain:hook);
|
native bool:EnableHookChain(HookChain:hook);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sets the return value of a hookchain.
|
* Sets the return value of a hookchain.
|
||||||
* This needs to be used in conjunction with RH_OVERRIDE or RH_SUPERCEDE.
|
* This needs to be used in conjunction with RH_OVERRIDE or RH_SUPERCEDE.
|
||||||
*
|
*
|
||||||
* @param type To specify the type RHV_*, look at the enum HookChainReturn
|
* @param type To specify the type RHV_*, look at the enum HookChainReturn
|
||||||
* @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:...);
|
native SetHookChainReturn(AType:type, any:...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Gets the return value of a hookchain.
|
* Gets the return value of a hookchain.
|
||||||
* This needs to be used in conjunction with RH_OVERRIDE or RH_SUPERCEDE.
|
* This needs to be used in conjunction with RH_OVERRIDE or RH_SUPERCEDE.
|
||||||
*
|
*
|
||||||
* @param type To specify the type RHV_*, look at the enum HookChainReturn
|
* @param type To specify the type RHV_*, look at the enum HookChainReturn
|
||||||
* @param value The value to set the return to.
|
* @param value The value to set the return to.
|
||||||
*
|
*
|
||||||
* native GetHookChainReturn(AType:type, any:...);
|
*/
|
||||||
*/
|
|
||||||
native GetHookChainReturn(AType:type, any:...);
|
native GetHookChainReturn(AType:type, any:...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -105,7 +103,6 @@ native GetHookChainReturn(AType:type, any:...);
|
|||||||
* @param [maxlen] Max length of string (optional)
|
* @param [maxlen] Max length of string (optional)
|
||||||
* @return Returns if the function is successful executed true otherwise false
|
* @return Returns if the function is successful executed true otherwise false
|
||||||
*
|
*
|
||||||
* native SetHookChainArg(number, AType:type, any:...);
|
|
||||||
*/
|
*/
|
||||||
native SetHookChainArg(number, AType:type, any:...);
|
native SetHookChainArg(number, AType:type, any:...);
|
||||||
|
|
||||||
|
@ -6,28 +6,28 @@
|
|||||||
|
|
||||||
enum EngineFunc
|
enum EngineFunc
|
||||||
{
|
{
|
||||||
/**
|
/*
|
||||||
* Description: -
|
* Description: -
|
||||||
* Params: (const recipients, const entity, const channel, const sample[], const volume, Float:attenuation, const fFlags, const pitch)
|
* Params: (const recipients, const entity, const channel, const sample[], const volume, Float:attenuation, const fFlags, const pitch)
|
||||||
*/
|
*/
|
||||||
RH_SV_StartSound = 0,
|
RH_SV_StartSound = 0,
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Description: -
|
* Description: -
|
||||||
* Params: (const client, bool:crash, const fmt[])
|
* Params: (const client, bool:crash, const fmt[])
|
||||||
*/
|
*/
|
||||||
RH_SV_DropClient,
|
RH_SV_DropClient,
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Description: -
|
* Description: -
|
||||||
* Params: (const runPhysics)
|
* Params: (const runPhysics)
|
||||||
*/
|
*/
|
||||||
RH_SV_ActivateServer,
|
RH_SV_ActivateServer,
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Description: -
|
* Description: -
|
||||||
* Params: (pcvar, const value[])
|
* Params: (pcvar, const value[])
|
||||||
*/
|
*/
|
||||||
RH_Cvar_DirectSet,
|
RH_Cvar_DirectSet,
|
||||||
|
|
||||||
// [...]
|
// [...]
|
||||||
|
@ -233,7 +233,7 @@ native rg_find_ent_by_class(start_index, const classname[]);
|
|||||||
*/
|
*/
|
||||||
native rg_find_ent_by_owner(&start_index, const classname[], owner);
|
native rg_find_ent_by_owner(&start_index, const classname[], owner);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Returns some information about a weapon.
|
* Returns some information about a 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
|
||||||
@ -242,11 +242,10 @@ native rg_find_ent_by_owner(&start_index, const classname[], owner);
|
|||||||
* @return Weapon information value
|
* @return Weapon information value
|
||||||
* @error If weapon_id and type are out of bound, an error will be thrown.
|
* @error If weapon_id and type are out of bound, an error will be thrown.
|
||||||
*
|
*
|
||||||
* native rg_get_weapon_info(any:...);
|
|
||||||
*/
|
*/
|
||||||
native rg_get_weapon_info(any:...);
|
native rg_get_weapon_info(any:...);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Sets specific values of weapons info.
|
* Sets specific values of weapons info.
|
||||||
*
|
*
|
||||||
* @param weapon_id Weapon id, see WEAPON_* constants
|
* @param weapon_id Weapon id, see WEAPON_* constants
|
||||||
@ -257,7 +256,17 @@ native rg_get_weapon_info(any:...);
|
|||||||
*/
|
*/
|
||||||
native rg_set_weapon_info(const {WeaponIdType,_}:weapon_id, WpnInfo:type, any:...);
|
native rg_set_weapon_info(const {WeaponIdType,_}:weapon_id, WpnInfo:type, any:...);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Remove all the player's stuff
|
||||||
|
*
|
||||||
|
* @param index Client index
|
||||||
|
*
|
||||||
|
* @noreturn
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
native rg_remove_all_items(const index, bool:bRemoveSuit);
|
||||||
|
|
||||||
|
/*
|
||||||
* Remove specifed the player's item by class name
|
* Remove specifed the player's item by class name
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -132,14 +132,12 @@ hook_t* hooklist_t::getHookSafe(size_t hook)
|
|||||||
|
|
||||||
void hooklist_t::clear()
|
void hooklist_t::clear()
|
||||||
{
|
{
|
||||||
for (auto& h : hooklist_engine)
|
#define FOREACH_CLEAR(h) for (auto& h : hooklist_##h) h.clear();
|
||||||
h.clear();
|
|
||||||
for (auto& h : hooklist_gamedll)
|
FOREACH_CLEAR(engine);
|
||||||
h.clear();
|
FOREACH_CLEAR(gamedll);
|
||||||
for (auto& h : hooklist_animating)
|
FOREACH_CLEAR(animating);
|
||||||
h.clear();
|
FOREACH_CLEAR(player);
|
||||||
for (auto& h : hooklist_player)
|
|
||||||
h.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void hook_t::clear()
|
void hook_t::clear()
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define MAX_REGION_RANGE 1024
|
|
||||||
#define BEGIN_FUNC_REGION(x) (MAX_REGION_RANGE * hooklist_t::hooks_tables_e::ht_##x)
|
|
||||||
#define MAX_HOOK_FORWARDS 1024
|
#define MAX_HOOK_FORWARDS 1024
|
||||||
|
#define MAX_REGION_RANGE 1024
|
||||||
|
|
||||||
|
#define BEGIN_FUNC_REGION(x) (MAX_REGION_RANGE * hooklist_t::hooks_tables_e::ht_##x)
|
||||||
|
|
||||||
typedef bool (*reqfunc_t)();
|
typedef bool (*reqfunc_t)();
|
||||||
typedef int (*regfunc_t)(AMX *, const char *);
|
typedef int (*regfunc_t)(AMX *, const char *);
|
||||||
|
@ -134,7 +134,7 @@ enum CSGameRules_Members
|
|||||||
m_bSkipSpawn
|
m_bSkipSpawn
|
||||||
};
|
};
|
||||||
|
|
||||||
// CBasePlayer
|
// CBaseEntity
|
||||||
enum CBaseEntity_Members
|
enum CBaseEntity_Members
|
||||||
{
|
{
|
||||||
currentammo = BEGIN_MEMBER_REGION(base),
|
currentammo = BEGIN_MEMBER_REGION(base),
|
||||||
|
@ -110,6 +110,7 @@ void RegisterNatives_Addons()
|
|||||||
{
|
{
|
||||||
if (api_cfg.hasVTC())
|
if (api_cfg.hasVTC())
|
||||||
g_amxxapi.AddNatives(Vtc_Natives);
|
g_amxxapi.AddNatives(Vtc_Natives);
|
||||||
|
|
||||||
if (api_cfg.hasReunion())
|
if (api_cfg.hasReunion())
|
||||||
g_amxxapi.AddNatives(Reunion_Natives);
|
g_amxxapi.AddNatives(Reunion_Natives);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@ public:
|
|||||||
{
|
{
|
||||||
return g_ReGameFuncs->INDEX_TO_CSENTITY(m_value);
|
return g_ReGameFuncs->INDEX_TO_CSENTITY(m_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector& vector() const
|
Vector& vector() const
|
||||||
{
|
{
|
||||||
return operator Vector&();
|
return operator Vector&();
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hook API function that are available into enum
|
* Hook API function that are available into enum
|
||||||
* Look at the enum's for parameter lists.
|
* Look at the enum's 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 handle to the hook. Use EnableHookChain/DisableHookChain to toggle the forward on or off.
|
* @return Returns a handle to the hook. Use EnableHookChain/DisableHookChain to toggle the forward on or off.
|
||||||
*
|
*
|
||||||
* native RegisterHookChain(any:function_id, const callback[], post = 0);
|
* native RegisterHookChain(any:function_id, const callback[], post = 0);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cell AMX_NATIVE_CALL RegisterHookChain(AMX *amx, cell *params)
|
cell AMX_NATIVE_CALL RegisterHookChain(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
enum args_e { arg_count, arg_func, arg_handler, arg_post };
|
enum args_e { arg_count, arg_func, arg_handler, arg_post };
|
||||||
@ -51,15 +50,14 @@ cell AMX_NATIVE_CALL RegisterHookChain(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable hook by handle.
|
* Enable hook by handle.
|
||||||
* Use the return value from RegisterHookChain as the parameter here!
|
* Use the return value from RegisterHookChain as the parameter here!
|
||||||
*
|
*
|
||||||
* @param fwd The hook to re-enable.
|
* @param fwd The hook to re-enable.
|
||||||
* @return Returns if the function is successful executed true otherwise false
|
* @return Returns if the function is successful executed true otherwise false
|
||||||
*
|
*
|
||||||
* native bool:EnableHookChain(any:fwd);
|
* native bool:EnableHookChain(any:fwd);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cell AMX_NATIVE_CALL EnableHookChain(AMX *amx, cell *params)
|
cell AMX_NATIVE_CALL EnableHookChain(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
enum args_e { arg_count, arg_handle_hook };
|
enum args_e { arg_count, arg_handle_hook };
|
||||||
@ -77,14 +75,13 @@ cell AMX_NATIVE_CALL EnableHookChain(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable hook by handle.
|
* Disable hook by handle.
|
||||||
* Use the return value from RegisterHookChain as the parameter here!
|
* Use the return value from RegisterHookChain as the parameter here!
|
||||||
*
|
*
|
||||||
* @param fwd The hook to stop.
|
* @param fwd The hook to stop.
|
||||||
*
|
*
|
||||||
* native bool:DisableHookChain(any:fwd);
|
* native bool:DisableHookChain(any:fwd);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cell AMX_NATIVE_CALL DisableHookChain(AMX *amx, cell *params)
|
cell AMX_NATIVE_CALL DisableHookChain(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
enum args_e { arg_count, arg_handle_hook };
|
enum args_e { arg_count, arg_handle_hook };
|
||||||
@ -102,15 +99,14 @@ cell AMX_NATIVE_CALL DisableHookChain(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sets the return value of a hookchain.
|
* Sets the return value of a hookchain.
|
||||||
* This needs to be used in conjunction with RH_OVERRIDE or RH_SUPERCEDE.
|
* This needs to be used in conjunction with RH_OVERRIDE or RH_SUPERCEDE.
|
||||||
*
|
*
|
||||||
* @param type To specify the type RHV_*, look at the enum AType
|
* @param type To specify the type RHV_*, 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:...);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cell AMX_NATIVE_CALL SetHookChainReturn(AMX *amx, cell *params)
|
cell AMX_NATIVE_CALL SetHookChainReturn(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
if (!g_hookCtx)
|
if (!g_hookCtx)
|
||||||
@ -168,7 +164,6 @@ cell AMX_NATIVE_CALL SetHookChainReturn(AMX *amx, cell *params)
|
|||||||
*
|
*
|
||||||
* native GetHookChainReturn(AType:type, any:...);
|
* native GetHookChainReturn(AType:type, any:...);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cell AMX_NATIVE_CALL GetHookChainReturn(AMX *amx, cell *params)
|
cell AMX_NATIVE_CALL GetHookChainReturn(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
if (!g_hookCtx)
|
if (!g_hookCtx)
|
||||||
@ -217,7 +212,6 @@ cell AMX_NATIVE_CALL GetHookChainReturn(AMX *amx, cell *params)
|
|||||||
*
|
*
|
||||||
* native SetHookChainArg(number, AType:type, any:...);
|
* native SetHookChainArg(number, AType:type, any:...);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cell AMX_NATIVE_CALL SetHookChainArg(AMX *amx, cell *params)
|
cell AMX_NATIVE_CALL SetHookChainArg(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
if (!g_hookCtx)
|
if (!g_hookCtx)
|
||||||
|
@ -480,7 +480,7 @@ cell AMX_NATIVE_CALL rg_find_ent_by_owner(AMX *amx, cell *params)
|
|||||||
cell& startIndex = *getAmxAddr(amx, params[arg_start_index]);
|
cell& startIndex = *getAmxAddr(amx, params[arg_start_index]);
|
||||||
const char* value = getAmxString(amx, params[arg_classname]);
|
const char* value = getAmxString(amx, params[arg_classname]);
|
||||||
edict_t* pOwner = edictByIndexAmx(params[arg_onwer]);
|
edict_t* pOwner = edictByIndexAmx(params[arg_onwer]);
|
||||||
edict_t* pEntity = &g_pEdicts[startIndex];
|
edict_t* pEntity = g_pEdicts + startIndex;
|
||||||
|
|
||||||
for (int i = startIndex; i < gpGlobals->maxEntities; i++, pEntity++)
|
for (int i = startIndex; i < gpGlobals->maxEntities; i++, pEntity++)
|
||||||
{
|
{
|
||||||
@ -501,7 +501,7 @@ cell AMX_NATIVE_CALL rg_find_ent_by_owner(AMX *amx, cell *params)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Returns some information about a weapon.
|
* Returns some information about a weapon.
|
||||||
*
|
*
|
||||||
* @param weapon name or id Weapon id, see WEAPON_* constants or weapon_* name
|
* @param weapon name or id Weapon id, see WEAPON_* constants or weapon_* name
|
||||||
@ -583,7 +583,7 @@ cell AMX_NATIVE_CALL rg_get_weapon_info(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Sets specific values of weapons info.
|
* Sets specific values of weapons info.
|
||||||
*
|
*
|
||||||
* @param weapon_id Weapon id, see WEAPON_* constants
|
* @param weapon_id Weapon id, see WEAPON_* constants
|
||||||
@ -631,14 +631,14 @@ cell AMX_NATIVE_CALL rg_set_weapon_info(AMX *amx, cell *params)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Remove all the player's stuff
|
* Remove all the player's stuff
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*
|
*
|
||||||
* native rg_remove_all_items(const index, bool:bRemove);
|
* native rg_remove_all_items(const index, bool:bRemoveSuit);
|
||||||
*/
|
*/
|
||||||
cell AMX_NATIVE_CALL rg_remove_all_items(AMX *amx, cell *params)
|
cell AMX_NATIVE_CALL rg_remove_all_items(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
@ -656,7 +656,7 @@ cell AMX_NATIVE_CALL rg_remove_all_items(AMX *amx, cell *params)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Remove specifed the player's item by class name
|
* Remove specifed the player's item by class name
|
||||||
*
|
*
|
||||||
* @param index Client index
|
* @param index Client index
|
||||||
|
Loading…
Reference in New Issue
Block a user