Added MNF_GetPlayerTeam for mahnsawce
This commit is contained in:
parent
9a21e3e9d3
commit
91decabfde
@ -1131,6 +1131,14 @@ const char *MNF_Format(const char *fmt, ...)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
const char *MNF_GetPlayerTeam(int id)
|
||||
{
|
||||
if (id < 1 || id > gpGlobals->maxClients)
|
||||
return NULL;
|
||||
|
||||
return (GET_PLAYER_POINTER_I(id)->team.c_str());
|
||||
}
|
||||
|
||||
#ifndef MEMORY_TEST
|
||||
void *MNF_Allocator(const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, const unsigned int allocationType, const size_t reportedSize)
|
||||
{
|
||||
@ -1214,6 +1222,7 @@ void *Module_ReqFnptr(const char *funcName)
|
||||
REGISTER_FUNC("GetPlayerPlayTime", MNF_GetPlayerPlayTime)
|
||||
REGISTER_FUNC("GetPlayerCurweapon", MNF_GetPlayerCurweapon)
|
||||
REGISTER_FUNC("GetPlayerTeamID", MNF_GetPlayerTeamID)
|
||||
REGISTER_FUNC("GetPlayerTeam", MNF_GetPlayerTeam)
|
||||
REGISTER_FUNC("GetPlayerDeaths", MNF_GetPlayerDeaths)
|
||||
REGISTER_FUNC("GetPlayerFrags", MNF_GetPlayerFrags)
|
||||
REGISTER_FUNC("GetPlayerMenu", MNF_GetPlayerMenu)
|
||||
|
@ -2453,6 +2453,7 @@ PFN_IS_PLAYER_AUTHORIZED g_fn_IsPlayerAuthorized;
|
||||
PFN_GET_PLAYER_TIME g_fn_GetPlayerTime;
|
||||
PFN_GET_PLAYER_PLAYTIME g_fn_GetPlayerPlayTime;
|
||||
PFN_GET_PLAYER_CURWEAPON g_fn_GetPlayerCurweapon;
|
||||
PFN_GET_PLAYER_TEAM g_fn_GetPlayerTeam;
|
||||
PFN_GET_PLAYER_TEAMID g_fn_GetPlayerTeamID;
|
||||
PFN_GET_PLAYER_DEATHS g_fn_GetPlayerDeaths;
|
||||
PFN_GET_PLAYER_MENU g_fn_GetPlayerMenu;
|
||||
@ -2664,6 +2665,7 @@ void ValidateMacros_DontCallThis_Smiley()
|
||||
MF_GetPlayerPlayTime(0);
|
||||
MF_GetPlayerCurweapon(0);
|
||||
MF_GetPlayerTeamID(0);
|
||||
MF_GetPlayerTeam(0);
|
||||
MF_GetPlayerDeaths(0);
|
||||
MF_GetPlayerMenu(0);
|
||||
MF_GetPlayerKeys(0);
|
||||
|
@ -1932,8 +1932,9 @@ 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_GETPLAYERFLAGS) (int /* id*/);
|
||||
typedef int (*PFN_GET_PLAYER_CURWEAPON) (int /*id*/);
|
||||
typedef const char * (*PFN_GET_PLAYER_TEAM) (int /*id*/)
|
||||
typedef int (*PFN_GET_PLAYER_TEAMID) (int /*id*/);
|
||||
typedef int (*PFN_GET_PLAYER_DEATHS) (int /*id*/);
|
||||
typedef int (*PFN_GET_PLAYER_MENU) (int /*id*/);
|
||||
@ -2026,6 +2027,7 @@ extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative;
|
||||
extern PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags;
|
||||
extern PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict;
|
||||
extern PFN_FORMAT g_fn_Format;
|
||||
extern PFN_GET_PLAYER_TEAM g_fn_GetPlayerTeam
|
||||
|
||||
#ifdef MAY_NEVER_BE_DEFINED
|
||||
// Function prototypes for intellisense and similar systems
|
||||
@ -2059,6 +2061,7 @@ int MF_IsPlayerAuthorized (int id) { }
|
||||
float MF_GetPlayerTime (int id) { }
|
||||
float MF_GetPlayerPlayTime (int id) { }
|
||||
int MF_GetPlayerCurweapon (int id) { }
|
||||
const char * MF_GetPlayerTeam (int id) { }
|
||||
int MF_GetPlayerTeamID (int id) { }
|
||||
int MF_GetPlayerDeaths (int id) { }
|
||||
int MF_GetPlayerMenu (int id) { }
|
||||
@ -2108,6 +2111,7 @@ void MF_Log(const char *fmt, ...);
|
||||
#define MF_GetPlayerTime g_fn_GetPlayerTime
|
||||
#define MF_GetPlayerPlayTime g_fn_GetPlayerPlayTime
|
||||
#define MF_GetPlayerCurweapon g_fn_GetPlayerCurweapon
|
||||
#define MF_GetPlayerTeam g_fn_GetPlayerTeam
|
||||
#define MF_GetPlayerTeamID g_fn_GetPlayerTeamID
|
||||
#define MF_GetPlayerDeaths g_fn_GetPlayerDeaths
|
||||
#define MF_GetPlayerMenu g_fn_GetPlayerMenu
|
||||
|
Loading…
Reference in New Issue
Block a user