mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 11:43:04 +08:00
[server] Implement/match n_GetPlayerColor(...)
This commit is contained in:
@@ -224,6 +224,7 @@ public:
|
|||||||
void SetSpawnInfo(PLAYER_SPAWN_INFO *pSpawn);
|
void SetSpawnInfo(PLAYER_SPAWN_INFO *pSpawn);
|
||||||
|
|
||||||
void SetPlayerColor(DWORD dwColor);
|
void SetPlayerColor(DWORD dwColor);
|
||||||
|
DWORD GetPlayerColor() { return m_dwColor; };
|
||||||
|
|
||||||
void SetCheckpoint(float fX, float fY, float fZ, float fSize);
|
void SetCheckpoint(float fX, float fY, float fZ, float fSize);
|
||||||
void ToggleCheckpoint(BOOL bEnabled);
|
void ToggleCheckpoint(BOOL bEnabled);
|
||||||
|
|||||||
@@ -941,9 +941,14 @@ static cell AMX_NATIVE_CALL n_SetPlayerColor(AMX *amx, cell *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// native GetPlayerColor(playerid)
|
||||||
static cell AMX_NATIVE_CALL n_GetPlayerColor(AMX *amx, cell *params)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user