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

This commit is contained in:
RD42 2024-09-17 11:16:39 +08:00
parent 5be383d8ba
commit b7b3ee511b
2 changed files with 8 additions and 1 deletions

View File

@ -207,6 +207,9 @@ public:
void ToggleCheckpoint(BOOL bEnabled);
void SetRaceCheckpoint(int iType, float fX, float fY, float fZ, float fNX, float fNY, float fNZ, float fSize);
void ToggleRaceCheckpoint(BOOL bEnabled);
BOOL IsInRaceCheckpoint() { return m_bInRaceCheckpoint; };
};
//----------------------------------------------------

View File

@ -1042,7 +1042,11 @@ static cell AMX_NATIVE_CALL n_DisablePlayerRaceCheckpoint(AMX *amx, cell *params
static cell AMX_NATIVE_CALL n_IsPlayerInRaceCheckpoint(AMX *amx, cell *params)
{
// TODO: IsPlayerInRaceCheckpoint
CPlayer *pPlayer = pNetGame->GetPlayerPool()->GetAt((PLAYERID)params[1]);
if (pPlayer)
{
return pPlayer->IsInRaceCheckpoint();
}
return 0;
}