[server] Implement/match n_IsPlayerInCheckpoint(...)

This commit is contained in:
RD42 2024-09-17 11:17:30 +08:00
parent b7b3ee511b
commit a64870c79a
2 changed files with 6 additions and 1 deletions

View File

@ -208,6 +208,7 @@ public:
void SetRaceCheckpoint(int iType, float fX, float fY, float fZ, float fNX, float fNY, float fNZ, float fSize);
void ToggleRaceCheckpoint(BOOL bEnabled);
BOOL IsInCheckpoint() { return m_bInCheckpoint; };
BOOL IsInRaceCheckpoint() { return m_bInRaceCheckpoint; };
};

View File

@ -1009,7 +1009,11 @@ static cell AMX_NATIVE_CALL n_DisablePlayerCheckpoint(AMX *amx, cell *params)
static cell AMX_NATIVE_CALL n_IsPlayerInCheckpoint(AMX *amx, cell *params)
{
// TODO: IsPlayerInCheckpoint
CPlayer *pPlayer = pNetGame->GetPlayerPool()->GetAt((PLAYERID)params[1]);
if (pPlayer)
{
return pPlayer->IsInCheckpoint();
}
return 0;
}