mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-19 12:16:15 +08:00
[server] Implement/match n_GetPlayerSurfingObjectID(...)
This commit is contained in:
@ -970,8 +970,17 @@ static cell AMX_NATIVE_CALL n_GetPlayerSurfingVehicleID(AMX *amx, cell *params)
|
||||
|
||||
static cell AMX_NATIVE_CALL n_GetPlayerSurfingObjectID(AMX *amx, cell *params)
|
||||
{
|
||||
// TODO: GetPlayerSurfingObjectID
|
||||
return 0;
|
||||
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
|
||||
if(!pPlayerPool) return 0xFFFF;
|
||||
|
||||
CPlayer *pPlayer = pPlayerPool->GetAt((PLAYERID)params[1]);
|
||||
if(pPlayer && pPlayer->GetState() == PLAYER_STATE_ONFOOT) {
|
||||
WORD wSurfInfo = pPlayer->GetOnFootSyncData()->wSurfInfo;
|
||||
if(wSurfInfo != 0 && wSurfInfo >= 2000 && wSurfInfo < 3000) {
|
||||
return wSurfInfo - 2000;
|
||||
}
|
||||
}
|
||||
return 0xFFFF;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL n_PutPlayerInVehicle(AMX *amx, cell *params)
|
||||
|
Reference in New Issue
Block a user