mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[server] Implement/match n_GetPlayerVehicleSeat(...)
This commit is contained in:
parent
9ac72cc0f7
commit
5242eac4ac
@ -182,7 +182,7 @@ public:
|
|||||||
BOOL m_bHasSpawnInfo;
|
BOOL m_bHasSpawnInfo;
|
||||||
char field_2C2F;
|
char field_2C2F;
|
||||||
char field_2C30;
|
char field_2C30;
|
||||||
char field_2C31;
|
BYTE m_byteSeatID;
|
||||||
VEHICLEID m_VehicleID;
|
VEHICLEID m_VehicleID;
|
||||||
DWORD m_dwColor;
|
DWORD m_dwColor;
|
||||||
BOOL m_bCheckpointEnabled;
|
BOOL m_bCheckpointEnabled;
|
||||||
|
@ -946,10 +946,18 @@ static cell AMX_NATIVE_CALL n_GetPlayerVehicleID(AMX *amx, cell *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// native GetPlayerVehicleSeat(playerid)
|
||||||
static cell AMX_NATIVE_CALL n_GetPlayerVehicleSeat(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GetPlayerVehicleSeat(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: GetPlayerVehicleSeat
|
CPlayer *pPlayer = pNetGame->GetPlayerPool()->GetAt((PLAYERID)params[1]);
|
||||||
return 0;
|
if (!pPlayer) return -1;
|
||||||
|
|
||||||
|
if (pPlayer->GetState() == PLAYER_STATE_DRIVER ||
|
||||||
|
pPlayer->GetState() == PLAYER_STATE_PASSENGER)
|
||||||
|
return pPlayer->m_byteSeatID;
|
||||||
|
|
||||||
|
// Vehicle not found or the player isn't in it;
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL n_GetPlayerSurfingVehicleID(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GetPlayerSurfingVehicleID(AMX *amx, cell *params)
|
||||||
|
Loading…
Reference in New Issue
Block a user