mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 19:53:04 +08:00
[bot] Implement/match n_GetPlayerKeys(...)
* Implement/match `CNetGame::GetPlayerKeys(...)`
This commit is contained in:
@@ -188,6 +188,38 @@ BYTE CNetGame::GetPlayerArmour(PLAYERID playerId)
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CNetGame::GetPlayerKeys(PLAYERID playerId, WORD *udAnalog, WORD *lrAnalog, WORD *wKeys)
|
||||
{
|
||||
if(playerId >= MAX_PLAYERS) return FALSE;
|
||||
if(bPlayerSlotState[playerId] == FALSE) return FALSE;
|
||||
|
||||
if(bytePlayerState[playerId] == PLAYER_STATE_ONFOOT)
|
||||
{
|
||||
*udAnalog = unnamed_3[playerId].udAnalog;
|
||||
*lrAnalog = unnamed_3[playerId].lrAnalog;
|
||||
*wKeys = unnamed_3[playerId].wKeys;
|
||||
return TRUE;
|
||||
}
|
||||
else if(bytePlayerState[playerId] == PLAYER_STATE_DRIVER)
|
||||
{
|
||||
*udAnalog = unnamed_4[playerId].udAnalog;
|
||||
*lrAnalog = unnamed_4[playerId].lrAnalog;
|
||||
*wKeys = unnamed_4[playerId].wKeys;
|
||||
return TRUE;
|
||||
}
|
||||
else if(bytePlayerState[playerId] == PLAYER_STATE_PASSENGER)
|
||||
{
|
||||
*udAnalog = unnamed_5[playerId].udAnalog;
|
||||
*lrAnalog = unnamed_5[playerId].lrAnalog;
|
||||
*wKeys = unnamed_5[playerId].wKeys;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
// MATCH
|
||||
BOOL CNetGame::IsPlayerAdded(PLAYERID playerId)
|
||||
|
||||
Reference in New Issue
Block a user