mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Commited new SDK
This commit is contained in:
parent
0b5c02f678
commit
02cb4b94f5
@ -703,6 +703,14 @@ char *MNF_FormatAmxString(AMX *amx, cell *params, int startParam, int *pLen)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
int MNF_GetPlayerFlags(int id)
|
||||
{
|
||||
if (id < 1 || id > gpGlobals->maxClients)
|
||||
return 0;
|
||||
CPlayer *pPlayer = GET_PLAYER_POINTER_I(id);
|
||||
return (pPlayer->flags[0]);
|
||||
}
|
||||
|
||||
void MNF_CopyAmxMemory(cell * dest, const cell * src, int len)
|
||||
{
|
||||
memcpy((void*)dest, (const void *)src, (size_t)len*sizeof(cell));
|
||||
@ -910,6 +918,7 @@ void *Module_ReqFnptr(const char *funcName)
|
||||
REGISTER_FUNC("PrepareCharArray", prepareCharArray)
|
||||
|
||||
// Player
|
||||
REGISTER_FUNC("GetPlayerFlags", MNF_GetPlayerFlags)
|
||||
REGISTER_FUNC("IsPlayerValid", MNF_IsPlayerValid)
|
||||
REGISTER_FUNC("GetPlayerName", MNF_GetPlayerName)
|
||||
REGISTER_FUNC("GetPlayerIP", MNF_GetPlayerIP)
|
||||
|
@ -2479,6 +2479,7 @@ PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName;
|
||||
PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward;
|
||||
PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File;
|
||||
PFN_AMX_FINDNATIVE g_fn_AmxFindNative;
|
||||
PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags;
|
||||
|
||||
// *** Exports ***
|
||||
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
|
||||
@ -2577,6 +2578,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
|
||||
REQFUNC("IsPlayerHLTV", g_fn_IsPlayerHLTV, PFN_IS_PLAYER_HLTV);
|
||||
REQFUNC("GetPlayerArmor", g_fn_GetPlayerArmor, PFN_GET_PLAYER_ARMOR);
|
||||
REQFUNC("GetPlayerHealth", g_fn_GetPlayerHealth, PFN_GET_PLAYER_HEALTH);
|
||||
REQFUNC("GetPlayerFlags", g_fn_GetPlayerFlags, PFN_GETPLAYERFLAGS);
|
||||
|
||||
// Memory
|
||||
REQFUNC_OPT("Allocator", g_fn_Allocator, PFN_ALLOCATOR);
|
||||
|
@ -1934,6 +1934,7 @@ typedef int (*PFN_IS_PLAYER_BOT) (int /*id*/);
|
||||
typedef int (*PFN_IS_PLAYER_AUTHORIZED) (int /*id*/);
|
||||
typedef float (*PFN_GET_PLAYER_TIME) (int /*id*/);
|
||||
typedef float (*PFN_GET_PLAYER_PLAYTIME) (int /*id*/);
|
||||
typedef int (*PFN_GETPLAYERFLAGS) (int /* id*/);
|
||||
typedef int (*PFN_GET_PLAYER_CURWEAPON) (int /*id*/);
|
||||
typedef int (*PFN_GET_PLAYER_TEAMID) (int /*id*/);
|
||||
typedef int (*PFN_GET_PLAYER_DEATHS) (int /*id*/);
|
||||
@ -2017,6 +2018,7 @@ extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName;
|
||||
extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward;
|
||||
extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File;
|
||||
extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative;
|
||||
extern PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags;
|
||||
|
||||
#ifdef MAY_NEVER_BE_DEFINED
|
||||
// Function prototypes for intellisense and similar systems
|
||||
@ -2065,6 +2067,7 @@ cell amx_ftoc (float x) { }
|
||||
int MF_RegisterSPForwardByName (AMX * amx, const char *str, ...) { }
|
||||
int MF_RegisterSPForward (AMX * amx, int func, ...) { }
|
||||
void MF_UnregisterSPForward (int id) { }
|
||||
int MF_GetPlayerFlags (int id) { }
|
||||
#endif // MAY_NEVER_BE_DEFINED
|
||||
|
||||
#define MF_AddNatives g_fn_AddNatives
|
||||
@ -2119,6 +2122,7 @@ void MF_Log(const char *fmt, ...);
|
||||
#define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName
|
||||
#define MF_RegisterSPForward g_fn_RegisterSPForward
|
||||
#define MF_UnregisterSPForward g_fn_UnregisterSPForward
|
||||
#define MF_GetPlayerFlags g_fn_GetPlayerFlags
|
||||
|
||||
/*** Memory ***/
|
||||
void *operator new(size_t reportedSize);
|
||||
|
Loading…
Reference in New Issue
Block a user