mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +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)
|
static cell AMX_NATIVE_CALL n_GetPlayerSurfingObjectID(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: GetPlayerSurfingObjectID
|
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
|
||||||
return 0;
|
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)
|
static cell AMX_NATIVE_CALL n_PutPlayerInVehicle(AMX *amx, cell *params)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user