mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[bot] Implement/match n_GetPlayerArmour(...)
* Implement/match `CNetGame::GetPlayerArmour()`
This commit is contained in:
parent
94ab5b9437
commit
7b974d6b4c
@ -165,6 +165,29 @@ BYTE CNetGame::GetPlayerHealth(PLAYERID playerId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BYTE CNetGame::GetPlayerArmour(PLAYERID playerId)
|
||||||
|
{
|
||||||
|
if(playerId >= MAX_PLAYERS) return 0;
|
||||||
|
if(bPlayerSlotState[playerId] == FALSE) return 0;
|
||||||
|
|
||||||
|
if(bytePlayerState[playerId] == PLAYER_STATE_ONFOOT)
|
||||||
|
{
|
||||||
|
return unnamed_3[playerId].byteArmour;
|
||||||
|
}
|
||||||
|
else if(bytePlayerState[playerId] == PLAYER_STATE_DRIVER)
|
||||||
|
{
|
||||||
|
return unnamed_4[playerId].bytePlayerArmour;
|
||||||
|
}
|
||||||
|
else if(bytePlayerState[playerId] == PLAYER_STATE_PASSENGER)
|
||||||
|
{
|
||||||
|
return unnamed_5[playerId].bytePlayerArmour;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
// MATCH
|
// MATCH
|
||||||
BOOL CNetGame::IsPlayerAdded(PLAYERID playerId)
|
BOOL CNetGame::IsPlayerAdded(PLAYERID playerId)
|
||||||
|
@ -112,6 +112,7 @@ public:
|
|||||||
VEHICLEID GetPlayerVehicleID(PLAYERID playerId);
|
VEHICLEID GetPlayerVehicleID(PLAYERID playerId);
|
||||||
BYTE GetPlayerArmedWeapon(PLAYERID playerId);
|
BYTE GetPlayerArmedWeapon(PLAYERID playerId);
|
||||||
BYTE GetPlayerHealth(PLAYERID playerId);
|
BYTE GetPlayerHealth(PLAYERID playerId);
|
||||||
|
BYTE GetPlayerArmour(PLAYERID playerId);
|
||||||
|
|
||||||
void StopRecordingPlayback();
|
void StopRecordingPlayback();
|
||||||
void PauseRecordingPlayback();
|
void PauseRecordingPlayback();
|
||||||
|
@ -196,7 +196,10 @@ static cell AMX_NATIVE_CALL n_GetPlayerHealth(AMX *amx, cell *params)
|
|||||||
// native GetPlayerArmour(playerid)
|
// native GetPlayerArmour(playerid)
|
||||||
static cell AMX_NATIVE_CALL n_GetPlayerArmour(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GetPlayerArmour(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: n_GetPlayerArmour
|
if(pNetGame->GetPlayerPool()->GetSlotState((PLAYERID)params[1]))
|
||||||
|
{
|
||||||
|
return (cell)pNetGame->GetPlayerArmour((PLAYERID)params[1]);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user