mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match CRemotePlayer::EnterVehicle(...)
This commit is contained in:
parent
63d04d6639
commit
9b91485a8a
@ -14,7 +14,7 @@ CRemotePlayer::CRemotePlayer()
|
||||
field_1E7 = 0;
|
||||
field_10A = 0;
|
||||
m_PlayerID = INVALID_PLAYER_ID;
|
||||
field_1DD = 0;
|
||||
m_pPlayerPed = NULL;
|
||||
field_1B8 = 0;
|
||||
field_109 = -1;
|
||||
field_4 = 1;
|
||||
@ -83,3 +83,20 @@ DWORD CRemotePlayer::GetPlayerColorAsARGB()
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void CRemotePlayer::EnterVehicle(VEHICLEID VehicleID, BOOL bPassenger)
|
||||
{
|
||||
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
|
||||
CVehicle *pVehicle = pVehiclePool->GetAt(VehicleID);
|
||||
|
||||
if(m_pPlayerPed && pVehicle && !m_pPlayerPed->IsInVehicle()) {
|
||||
int iGtaVehicleID = pVehiclePool->FindGtaIDFromID(VehicleID);
|
||||
if(iGtaVehicleID && iGtaVehicleID != INVALID_VEHICLE_ID) {
|
||||
m_pPlayerPed->SetKeys(0,0,0);
|
||||
m_pPlayerPed->EnterVehicle(iGtaVehicleID,bPassenger);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
|
@ -41,7 +41,7 @@ private:
|
||||
char field_1C9[12];
|
||||
DWORD field_1D5;
|
||||
DWORD field_1D9;
|
||||
int field_1DD;
|
||||
CPlayerPed *m_pPlayerPed;
|
||||
int field_1E1;
|
||||
PLAYERID m_PlayerID;
|
||||
short field_1E7;
|
||||
@ -60,6 +60,8 @@ public:
|
||||
void SetPlayerColor(DWORD dwColor);
|
||||
DWORD GetPlayerColorAsRGBA();
|
||||
DWORD GetPlayerColorAsARGB();
|
||||
|
||||
void EnterVehicle(VEHICLEID VehicleID, BOOL bPassenger);
|
||||
};
|
||||
|
||||
//----------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user