[saco] Implement/match CPlayerPed::ProcessVehicleHorn()

This commit is contained in:
RD42 2024-10-29 11:47:52 +08:00
parent 484218bf73
commit 014b86266b
2 changed files with 30 additions and 0 deletions

View File

@ -1006,6 +1006,34 @@ VEHICLE_TYPE* CPlayerPed::GetGtaContactVehicle()
//-----------------------------------------------------------
void CPlayerPed::ProcessVehicleHorn()
{
if(!m_pPed) return;
if(!GamePool_Ped_GetAt(m_dwGTAId)) return;
GTA_CONTROLSET *pPlayerControls;
if(!m_bytePlayerNumber) {
pPlayerControls = GameGetInternalKeys();
} else {
pPlayerControls = GameGetPlayerKeys(m_bytePlayerNumber);
}
VEHICLE_TYPE *pGtaVehicle = (VEHICLE_TYPE *)m_pPed->pVehicle;
if(pGtaVehicle) {
if(IN_VEHICLE(m_pPed) && (pGtaVehicle->pDriver == m_pPed)) {
if(pPlayerControls->wKeys1[18]) {
pGtaVehicle->byteHorn2 = 1;
} else {
pGtaVehicle->byteHorn2 = 0;
}
}
}
}
//-----------------------------------------------------------
PCHAR CPlayerPed::GetLoadedShopName()
{
if(!m_pPed) return NULL;

View File

@ -92,6 +92,8 @@ public:
CPlayerPed();
void ProcessVehicleHorn();
void HandsUp();
float GetAimZ();