mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-19 20:26:14 +08:00
[saco] Implement/match CPlayerPed::ProcessVehicleHorn()
This commit is contained in:
@ -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()
|
PCHAR CPlayerPed::GetLoadedShopName()
|
||||||
{
|
{
|
||||||
if(!m_pPed) return NULL;
|
if(!m_pPed) return NULL;
|
||||||
|
@ -92,6 +92,8 @@ public:
|
|||||||
|
|
||||||
CPlayerPed();
|
CPlayerPed();
|
||||||
|
|
||||||
|
void ProcessVehicleHorn();
|
||||||
|
|
||||||
void HandsUp();
|
void HandsUp();
|
||||||
|
|
||||||
float GetAimZ();
|
float GetAimZ();
|
||||||
|
Reference in New Issue
Block a user