mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[server] Implement/match n_GetPlayerVehicleID(...)
This commit is contained in:
parent
e922c795f9
commit
9ac72cc0f7
@ -934,9 +934,15 @@ static cell AMX_NATIVE_CALL n_GetPlayerColor(AMX *amx, cell *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// native GetPlayerVehicleID(playerid)
|
||||
static cell AMX_NATIVE_CALL n_GetPlayerVehicleID(AMX *amx, cell *params)
|
||||
{
|
||||
// TODO: GetPlayerVehicleID
|
||||
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
|
||||
if(!pPlayerPool) return 0;
|
||||
CPlayer *pPlayer = pNetGame->GetPlayerPool()->GetAt((PLAYERID)params[1]);
|
||||
if(pPlayer) {
|
||||
return pPlayer->m_VehicleID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user