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

This commit is contained in:
RD42 2024-09-20 23:39:31 +08:00
parent 3bafae404e
commit 094912cedc
2 changed files with 7 additions and 1 deletions

View File

@ -224,6 +224,7 @@ public:
void SetSpawnInfo(PLAYER_SPAWN_INFO *pSpawn);
void SetPlayerColor(DWORD dwColor);
DWORD GetPlayerColor() { return m_dwColor; };
void SetCheckpoint(float fX, float fY, float fZ, float fSize);
void ToggleCheckpoint(BOOL bEnabled);

View File

@ -941,9 +941,14 @@ static cell AMX_NATIVE_CALL n_SetPlayerColor(AMX *amx, cell *params)
return 0;
}
// native GetPlayerColor(playerid)
static cell AMX_NATIVE_CALL n_GetPlayerColor(AMX *amx, cell *params)
{
// TODO: GetPlayerColor
CPlayer* pPlayer = pNetGame->GetPlayerPool()->GetAt((PLAYERID)params[1]);
if(pPlayer) {
return pPlayer->GetPlayerColor();
}
return 0;
}