mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-20 12:46:07 +08:00
[server] Implement/match n_IsPlayerInCheckpoint(...)
This commit is contained in:
@ -208,6 +208,7 @@ public:
|
|||||||
void SetRaceCheckpoint(int iType, float fX, float fY, float fZ, float fNX, float fNY, float fNZ, float fSize);
|
void SetRaceCheckpoint(int iType, float fX, float fY, float fZ, float fNX, float fNY, float fNZ, float fSize);
|
||||||
void ToggleRaceCheckpoint(BOOL bEnabled);
|
void ToggleRaceCheckpoint(BOOL bEnabled);
|
||||||
|
|
||||||
|
BOOL IsInCheckpoint() { return m_bInCheckpoint; };
|
||||||
BOOL IsInRaceCheckpoint() { return m_bInRaceCheckpoint; };
|
BOOL IsInRaceCheckpoint() { return m_bInRaceCheckpoint; };
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -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)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user