mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
added MF_GetPlayerEdict (replacement for INDEXENT on players) and MF_Format.
This commit is contained in:
parent
f5a997069d
commit
7334f968a8
@ -2524,6 +2524,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
|
|||||||
REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME);
|
REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME);
|
||||||
REQFUNC("Log", g_fn_Log, PFN_LOG);
|
REQFUNC("Log", g_fn_Log, PFN_LOG);
|
||||||
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
|
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
|
||||||
|
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
|
||||||
|
|
||||||
// Amx scripts
|
// Amx scripts
|
||||||
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
|
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
|
||||||
@ -2579,6 +2580,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
|
|||||||
REQFUNC("GetPlayerArmor", g_fn_GetPlayerArmor, PFN_GET_PLAYER_ARMOR);
|
REQFUNC("GetPlayerArmor", g_fn_GetPlayerArmor, PFN_GET_PLAYER_ARMOR);
|
||||||
REQFUNC("GetPlayerHealth", g_fn_GetPlayerHealth, PFN_GET_PLAYER_HEALTH);
|
REQFUNC("GetPlayerHealth", g_fn_GetPlayerHealth, PFN_GET_PLAYER_HEALTH);
|
||||||
REQFUNC("GetPlayerFlags", g_fn_GetPlayerFlags, PFN_GETPLAYERFLAGS);
|
REQFUNC("GetPlayerFlags", g_fn_GetPlayerFlags, PFN_GETPLAYERFLAGS);
|
||||||
|
REQFUNC("GetPlayerEdict", g_fn_GetPlayerEdict, PFN_GET_PLAYER_EDICT);
|
||||||
|
|
||||||
// Memory
|
// Memory
|
||||||
REQFUNC_OPT("Allocator", g_fn_Allocator, PFN_ALLOCATOR);
|
REQFUNC_OPT("Allocator", g_fn_Allocator, PFN_ALLOCATOR);
|
||||||
@ -2673,11 +2675,14 @@ void ValidateMacros_DontCallThis_Smiley()
|
|||||||
MF_AmxExecv(0, 0, 0, 0, 0);
|
MF_AmxExecv(0, 0, 0, 0, 0);
|
||||||
MF_AmxFindPublic(0, 0, 0);
|
MF_AmxFindPublic(0, 0, 0);
|
||||||
MF_AmxAllot(0, 0, 0, 0);
|
MF_AmxAllot(0, 0, 0, 0);
|
||||||
MF_LoadAmxScript(0, 0, 0, 0);
|
MF_LoadAmxScript(0, 0, 0, 0, 0);
|
||||||
MF_UnloadAmxScript(0, 0);
|
MF_UnloadAmxScript(0, 0);
|
||||||
MF_RegisterSPForward(0, 0, 0, 0, 0, 0);
|
MF_RegisterSPForward(0, 0, 0, 0, 0, 0);
|
||||||
MF_RegisterSPForwardByName(0, 0, 0, 0, 0, 0);
|
MF_RegisterSPForwardByName(0, 0, 0, 0, 0, 0);
|
||||||
MF_UnregisterSPForward(0);
|
MF_UnregisterSPForward(0);
|
||||||
|
MF_GetPlayerFrags(0);
|
||||||
|
MF_GetPlayerEdict(0);
|
||||||
|
MF_Format("", 4, "str");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1944,6 +1944,8 @@ typedef int (*PFN_IS_PLAYER_CONNECTING) (int /*id*/);
|
|||||||
typedef int (*PFN_IS_PLAYER_HLTV) (int /*id*/);
|
typedef int (*PFN_IS_PLAYER_HLTV) (int /*id*/);
|
||||||
typedef int (*PFN_GET_PLAYER_ARMOR) (int /*id*/);
|
typedef int (*PFN_GET_PLAYER_ARMOR) (int /*id*/);
|
||||||
typedef int (*PFN_GET_PLAYER_HEALTH) (int /*id*/);
|
typedef int (*PFN_GET_PLAYER_HEALTH) (int /*id*/);
|
||||||
|
typedef edict_t * (*PFN_GET_PLAYER_EDICT) (int /*id*/);
|
||||||
|
|
||||||
typedef void * (*PFN_ALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/,
|
typedef void * (*PFN_ALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/,
|
||||||
const unsigned int /*type*/, const size_t /*size*/);
|
const unsigned int /*type*/, const size_t /*size*/);
|
||||||
typedef void * (*PFN_REALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/,
|
typedef void * (*PFN_REALLOCATOR) (const char* /*filename*/, const unsigned int /*line*/, const char* /*func*/,
|
||||||
@ -1963,6 +1965,7 @@ typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*pa
|
|||||||
typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/);
|
typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/);
|
||||||
typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/);
|
typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/);
|
||||||
typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/);
|
typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/);
|
||||||
|
typedef const char * (*PFN_FORMAT) (const char * /*fmt*/, ... /*params*/);
|
||||||
|
|
||||||
extern PFN_ADD_NATIVES g_fn_AddNatives;
|
extern PFN_ADD_NATIVES g_fn_AddNatives;
|
||||||
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
|
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
|
||||||
@ -2017,6 +2020,8 @@ extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward;
|
|||||||
extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File;
|
extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File;
|
||||||
extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative;
|
extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative;
|
||||||
extern PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags;
|
extern PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags;
|
||||||
|
extern PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict;
|
||||||
|
extern PFN_FORMAT g_fn_Format;
|
||||||
|
|
||||||
#ifdef MAY_NEVER_BE_DEFINED
|
#ifdef MAY_NEVER_BE_DEFINED
|
||||||
// Function prototypes for intellisense and similar systems
|
// Function prototypes for intellisense and similar systems
|
||||||
@ -2066,6 +2071,8 @@ int MF_RegisterSPForwardByName (AMX * amx, const char *str, ...) { }
|
|||||||
int MF_RegisterSPForward (AMX * amx, int func, ...) { }
|
int MF_RegisterSPForward (AMX * amx, int func, ...) { }
|
||||||
void MF_UnregisterSPForward (int id) { }
|
void MF_UnregisterSPForward (int id) { }
|
||||||
int MF_GetPlayerFlags (int id) { }
|
int MF_GetPlayerFlags (int id) { }
|
||||||
|
edict_t* MF_GetPlayerEdict (int id) { }
|
||||||
|
const char * MF_Format (const char *fmt, ...) { }
|
||||||
#endif // MAY_NEVER_BE_DEFINED
|
#endif // MAY_NEVER_BE_DEFINED
|
||||||
|
|
||||||
#define MF_AddNatives g_fn_AddNatives
|
#define MF_AddNatives g_fn_AddNatives
|
||||||
@ -2121,6 +2128,8 @@ void MF_Log(const char *fmt, ...);
|
|||||||
#define MF_RegisterSPForward g_fn_RegisterSPForward
|
#define MF_RegisterSPForward g_fn_RegisterSPForward
|
||||||
#define MF_UnregisterSPForward g_fn_UnregisterSPForward
|
#define MF_UnregisterSPForward g_fn_UnregisterSPForward
|
||||||
#define MF_GetPlayerFlags g_fn_GetPlayerFlags
|
#define MF_GetPlayerFlags g_fn_GetPlayerFlags
|
||||||
|
#define MF_GetPlayerEdict g_fn_GetPlayerEdict
|
||||||
|
#define MF_Format g_fn_Format;
|
||||||
|
|
||||||
#ifdef MEMORY_TEST
|
#ifdef MEMORY_TEST
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user