mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[bot] Implement/match n_GetPlayerVehicleID(...)
* Implement/match `CNetGame::GetPlayerVehicleID(...)`
This commit is contained in:
parent
3930e321c9
commit
c264951e74
@ -100,6 +100,25 @@ BOOL CNetGame::GetPlayerPos(PLAYERID playerId, PVECTOR Vector)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VEHICLEID CNetGame::GetPlayerVehicleID(PLAYERID playerId)
|
||||||
|
{
|
||||||
|
if(playerId >= MAX_PLAYERS) return INVALID_VEHICLE_ID;
|
||||||
|
if(bPlayerSlotState[playerId] == FALSE) return INVALID_VEHICLE_ID;
|
||||||
|
|
||||||
|
if(bytePlayerState[playerId] == PLAYER_STATE_DRIVER)
|
||||||
|
{
|
||||||
|
return unnamed_4[playerId].VehicleID;
|
||||||
|
}
|
||||||
|
else if(bytePlayerState[playerId] == PLAYER_STATE_PASSENGER)
|
||||||
|
{
|
||||||
|
return unnamed_5[playerId].VehicleID;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return INVALID_VEHICLE_ID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
// MATCH
|
// MATCH
|
||||||
BOOL CNetGame::IsPlayerAdded(PLAYERID playerId)
|
BOOL CNetGame::IsPlayerAdded(PLAYERID playerId)
|
||||||
|
@ -109,6 +109,7 @@ public:
|
|||||||
void SetPlayerState(PLAYERID playerId, BYTE byteState);
|
void SetPlayerState(PLAYERID playerId, BYTE byteState);
|
||||||
BYTE GetPlayerState(PLAYERID playerId);
|
BYTE GetPlayerState(PLAYERID playerId);
|
||||||
BOOL GetPlayerPos(PLAYERID playerId, PVECTOR Vector);
|
BOOL GetPlayerPos(PLAYERID playerId, PVECTOR Vector);
|
||||||
|
VEHICLEID GetPlayerVehicleID(PLAYERID playerId);
|
||||||
void StopRecordingPlayback();
|
void StopRecordingPlayback();
|
||||||
void PauseRecordingPlayback();
|
void PauseRecordingPlayback();
|
||||||
void ResumeRecordingPlayback();
|
void ResumeRecordingPlayback();
|
||||||
|
@ -166,7 +166,10 @@ static cell AMX_NATIVE_CALL n_GetPlayerPos(AMX *amx, cell *params)
|
|||||||
// native GetPlayerVehicleID(playerid)
|
// native GetPlayerVehicleID(playerid)
|
||||||
static cell AMX_NATIVE_CALL n_GetPlayerVehicleID(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GetPlayerVehicleID(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: n_GetPlayerVehicleID
|
if(pNetGame->GetPlayerPool()->GetSlotState((PLAYERID)params[1]))
|
||||||
|
{
|
||||||
|
return pNetGame->GetPlayerVehicleID((PLAYERID)params[1]);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user