mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement/match CPlayerPed::ProcessVehicleHorn()
This commit is contained in:
parent
484218bf73
commit
014b86266b
@ -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;
|
||||
|
@ -92,6 +92,8 @@ public:
|
||||
|
||||
CPlayerPed();
|
||||
|
||||
void ProcessVehicleHorn();
|
||||
|
||||
void HandsUp();
|
||||
|
||||
float GetAimZ();
|
||||
|
Loading…
Reference in New Issue
Block a user