mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[server] Implement/match n_GetPlayerSurfingObjectID(...)
This commit is contained in:
parent
c972dd0ade
commit
cace251a9d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user