mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 17:58:16 +08:00
[server] Implement/match n_GetPlayerVehicleID(...)
This commit is contained in:
1 parent
e922c795f9
commit
9ac72cc0f7
1 file changed
+7
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user