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
|
||||
* Look at the enum's for parameter lists.
|
||||
*
|
||||
* @param function The function to hook.
|
||||
* @param callback The forward to call.
|
||||
* @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.
|
||||
*
|
||||
*/
|
||||
* Hook API function that are available into enum
|
||||
* Look at the enum's for parameter lists.
|
||||
*
|
||||
* @param function The function to hook.
|
||||
* @param callback The forward to call.
|
||||
* @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.
|
||||
*
|
||||
*/
|
||||
native HookChain:RegisterHookChain(any:function_id, const callback[], post = 0);
|
||||
|
||||
/*
|
||||
* Stops a hook from triggering.
|
||||
* Use the return value from RegisterHookChain as the parameter here!
|
||||
*
|
||||
* @param hook The hook to stop.
|
||||
*
|
||||
*/
|
||||
* Stops a hook from triggering.
|
||||
* Use the return value from RegisterHookChain as the parameter here!
|
||||
*
|
||||
* @param hook The hook to stop.
|
||||
*
|
||||
*/
|
||||
native bool:DisableHookChain(HookChain:hook);
|
||||
|
||||
/*
|
||||
* Starts a hook back up.
|
||||
* Use the return value from RegisterHookChain as the parameter here!
|
||||
*
|
||||
* @param hook The hook to re-enable.
|
||||
* @return Returns if the function is successful executed true otherwise false
|
||||
*
|
||||
*/
|
||||
* Starts a hook back up.
|
||||
* Use the return value from RegisterHookChain as the parameter here!
|
||||
*
|
||||
* @param hook The hook to re-enable.
|
||||
* @return Returns if the function is successful executed true otherwise false
|
||||
*
|
||||
*/
|
||||
native bool:EnableHookChain(HookChain:hook);
|
||||
|
||||
/*
|
||||
* Sets the return value of a hookchain.
|
||||
* 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 value The value to set the return to.
|
||||
*
|
||||
* native SetHookChainReturn(AType:type, any:...);
|
||||
*/
|
||||
* Sets the return value of a hookchain.
|
||||
* 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 value The value to set the return to.
|
||||
*
|
||||
*/
|
||||
native SetHookChainReturn(AType:type, any:...);
|
||||
|
||||
/*
|
||||
* Gets the return value of a hookchain.
|
||||
* 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 value The value to set the return to.
|
||||
*
|
||||
* native GetHookChainReturn(AType:type, any:...);
|
||||
*/
|
||||
* Gets the return value of a hookchain.
|
||||
* 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 value The value to set the return to.
|
||||
*
|
||||
*/
|
||||
native GetHookChainReturn(AType:type, any:...);
|
||||
|
||||
/*
|
||||
@ -105,7 +103,6 @@ native GetHookChainReturn(AType:type, any:...);
|
||||
* @param [maxlen] Max length of string (optional)
|
||||
* @return Returns if the function is successful executed true otherwise false
|
||||
*
|
||||
* native SetHookChainArg(number, AType:type, any:...);
|
||||
*/
|
||||
native SetHookChainArg(number, AType:type, any:...);
|
||||
|
||||
|
@ -6,25 +6,25 @@
|
||||
|
||||
enum EngineFunc
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* Description: -
|
||||
* Params: (const recipients, const entity, const channel, const sample[], const volume, Float:attenuation, const fFlags, const pitch)
|
||||
*/
|
||||
RH_SV_StartSound = 0,
|
||||
|
||||
/**
|
||||
/*
|
||||
* Description: -
|
||||
* Params: (const client, bool:crash, const fmt[])
|
||||
*/
|
||||
RH_SV_DropClient,
|
||||
|
||||
/**
|
||||
/*
|
||||
* Description: -
|
||||
* Params: (const runPhysics)
|
||||
*/
|
||||
RH_SV_ActivateServer,
|
||||
|
||||
/**
|
||||
/*
|
||||
* Description: -
|
||||
* Params: (pcvar, const value[])
|
||||
*/
|
||||
|
@ -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);
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns some information about a weapon.
|
||||
*
|
||||
* @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
|
||||
* @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:...);
|
||||
|
||||
/**
|
||||
/*
|
||||
* Sets specific values of weapons info.
|
||||
*
|
||||
* @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:...);
|
||||
|
||||
/**
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
* @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()
|
||||
{
|
||||
for (auto& h : hooklist_engine)
|
||||
h.clear();
|
||||
for (auto& h : hooklist_gamedll)
|
||||
h.clear();
|
||||
for (auto& h : hooklist_animating)
|
||||
h.clear();
|
||||
for (auto& h : hooklist_player)
|
||||
h.clear();
|
||||
#define FOREACH_CLEAR(h) for (auto& h : hooklist_##h) h.clear();
|
||||
|
||||
FOREACH_CLEAR(engine);
|
||||
FOREACH_CLEAR(gamedll);
|
||||
FOREACH_CLEAR(animating);
|
||||
FOREACH_CLEAR(player);
|
||||
}
|
||||
|
||||
void hook_t::clear()
|
||||
|
@ -1,8 +1,9 @@
|
||||
#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_REGION_RANGE 1024
|
||||
|
||||
#define BEGIN_FUNC_REGION(x) (MAX_REGION_RANGE * hooklist_t::hooks_tables_e::ht_##x)
|
||||
|
||||
typedef bool (*reqfunc_t)();
|
||||
typedef int (*regfunc_t)(AMX *, const char *);
|
||||
|
@ -134,7 +134,7 @@ enum CSGameRules_Members
|
||||
m_bSkipSpawn
|
||||
};
|
||||
|
||||
// CBasePlayer
|
||||
// CBaseEntity
|
||||
enum CBaseEntity_Members
|
||||
{
|
||||
currentammo = BEGIN_MEMBER_REGION(base),
|
||||
|
@ -110,6 +110,7 @@ void RegisterNatives_Addons()
|
||||
{
|
||||
if (api_cfg.hasVTC())
|
||||
g_amxxapi.AddNatives(Vtc_Natives);
|
||||
|
||||
if (api_cfg.hasReunion())
|
||||
g_amxxapi.AddNatives(Reunion_Natives);
|
||||
}
|
||||
|
@ -52,7 +52,6 @@ public:
|
||||
{
|
||||
return g_ReGameFuncs->INDEX_TO_CSENTITY(m_value);
|
||||
}
|
||||
|
||||
Vector& vector() const
|
||||
{
|
||||
return operator Vector&();
|
||||
|
@ -1,17 +1,16 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
/*
|
||||
* Hook API function that are available into enum
|
||||
* Look at the enum's for parameter lists.
|
||||
*
|
||||
* @param function The function to hook.
|
||||
* @param callback The forward to call.
|
||||
* @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.
|
||||
*
|
||||
* native RegisterHookChain(any:function_id, const callback[], post = 0);
|
||||
*/
|
||||
|
||||
* Hook API function that are available into enum
|
||||
* Look at the enum's for parameter lists.
|
||||
*
|
||||
* @param function The function to hook.
|
||||
* @param callback The forward to call.
|
||||
* @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.
|
||||
*
|
||||
* native RegisterHookChain(any:function_id, const callback[], post = 0);
|
||||
*/
|
||||
cell AMX_NATIVE_CALL RegisterHookChain(AMX *amx, cell *params)
|
||||
{
|
||||
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.
|
||||
* Use the return value from RegisterHookChain as the parameter here!
|
||||
*
|
||||
* @param fwd The hook to re-enable.
|
||||
* @return Returns if the function is successful executed true otherwise false
|
||||
*
|
||||
* native bool:EnableHookChain(any:fwd);
|
||||
*/
|
||||
|
||||
* Enable hook by handle.
|
||||
* Use the return value from RegisterHookChain as the parameter here!
|
||||
*
|
||||
* @param fwd The hook to re-enable.
|
||||
* @return Returns if the function is successful executed true otherwise false
|
||||
*
|
||||
* native bool:EnableHookChain(any:fwd);
|
||||
*/
|
||||
cell AMX_NATIVE_CALL EnableHookChain(AMX *amx, cell *params)
|
||||
{
|
||||
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.
|
||||
* Use the return value from RegisterHookChain as the parameter here!
|
||||
*
|
||||
* @param fwd The hook to stop.
|
||||
*
|
||||
* native bool:DisableHookChain(any:fwd);
|
||||
*/
|
||||
|
||||
* Disable hook by handle.
|
||||
* Use the return value from RegisterHookChain as the parameter here!
|
||||
*
|
||||
* @param fwd The hook to stop.
|
||||
*
|
||||
* native bool:DisableHookChain(any:fwd);
|
||||
*/
|
||||
cell AMX_NATIVE_CALL DisableHookChain(AMX *amx, cell *params)
|
||||
{
|
||||
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.
|
||||
* 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 value The value to set the return to.
|
||||
*
|
||||
* native SetHookChainReturn(AType:type, any:...);
|
||||
*/
|
||||
|
||||
* Sets the return value of a hookchain.
|
||||
* 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 value The value to set the return to.
|
||||
*
|
||||
* native SetHookChainReturn(AType:type, any:...);
|
||||
*/
|
||||
cell AMX_NATIVE_CALL SetHookChainReturn(AMX *amx, cell *params)
|
||||
{
|
||||
if (!g_hookCtx)
|
||||
@ -168,7 +164,6 @@ cell AMX_NATIVE_CALL SetHookChainReturn(AMX *amx, cell *params)
|
||||
*
|
||||
* native GetHookChainReturn(AType:type, any:...);
|
||||
*/
|
||||
|
||||
cell AMX_NATIVE_CALL GetHookChainReturn(AMX *amx, cell *params)
|
||||
{
|
||||
if (!g_hookCtx)
|
||||
@ -217,7 +212,6 @@ cell AMX_NATIVE_CALL GetHookChainReturn(AMX *amx, cell *params)
|
||||
*
|
||||
* native SetHookChainArg(number, AType:type, any:...);
|
||||
*/
|
||||
|
||||
cell AMX_NATIVE_CALL SetHookChainArg(AMX *amx, cell *params)
|
||||
{
|
||||
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]);
|
||||
const char* value = getAmxString(amx, params[arg_classname]);
|
||||
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++)
|
||||
{
|
||||
@ -501,7 +501,7 @@ cell AMX_NATIVE_CALL rg_find_ent_by_owner(AMX *amx, cell *params)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns some information about a weapon.
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Remove all the player's stuff
|
||||
*
|
||||
* @param index Client index
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
@ -656,7 +656,7 @@ cell AMX_NATIVE_CALL rg_remove_all_items(AMX *amx, cell *params)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Remove specifed the player's item by class name
|
||||
*
|
||||
* @param index Client index
|
||||
|
Loading…
Reference in New Issue
Block a user