2
0
mirror of https://github.com/rehlds/reapi.git synced 2025-01-01 01:25:47 +03:00

Added bypass warning 200 on amxmodx 1.8.2

This commit is contained in:
s1lentq 2016-05-11 22:54:06 +06:00
parent 86aead4b02
commit 9bdeb103eb
11 changed files with 2028 additions and 2022 deletions

View File

@ -81,7 +81,6 @@ native bool:EnableHookChain(HookChain:hook);
* @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:...);
@ -92,7 +91,6 @@ native SetHookChainReturn(AType:type, any:...);
* @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:...);

View File

@ -6,25 +6,25 @@
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[])
*/ */

View File

@ -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

View File

@ -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()

View File

@ -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 *);

View File

@ -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),

View File

@ -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);
} }

View File

@ -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&();

View File

@ -11,7 +11,6 @@
* *
* 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 };
@ -59,7 +58,6 @@ cell AMX_NATIVE_CALL RegisterHookChain(AMX *amx, cell *params)
* *
* 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 };
@ -84,7 +82,6 @@ cell AMX_NATIVE_CALL EnableHookChain(AMX *amx, cell *params)
* *
* 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 };
@ -110,7 +107,6 @@ cell AMX_NATIVE_CALL DisableHookChain(AMX *amx, cell *params)
* *
* 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)

View File

@ -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