diff --git a/server/player.h b/server/player.h index 9101282..44fba12 100644 --- a/server/player.h +++ b/server/player.h @@ -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; }; + }; //---------------------------------------------------- diff --git a/server/scrcustom.cpp b/server/scrcustom.cpp index b09370f..fe59a6f 100644 --- a/server/scrcustom.cpp +++ b/server/scrcustom.cpp @@ -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; }