mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[server] Implement/match n_IsPlayerInAnyVehicle(...)
This commit is contained in:
parent
0afe0a4965
commit
f74fc485c4
@ -994,9 +994,18 @@ static cell AMX_NATIVE_CALL n_IsPlayerInVehicle(AMX *amx, cell *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// native IsPlayerInAnyVehicle(playerid)
|
||||||
static cell AMX_NATIVE_CALL n_IsPlayerInAnyVehicle(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_IsPlayerInAnyVehicle(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: IsPlayerInAnyVehicle
|
CPlayer* pPlayer = pNetGame->GetPlayerPool()->GetAt((PLAYERID)params[1]);
|
||||||
|
if (!pPlayer) return 0;
|
||||||
|
BYTE byteState = pPlayer->GetState();
|
||||||
|
|
||||||
|
if ((byteState == PLAYER_STATE_DRIVER) || (byteState == PLAYER_STATE_PASSENGER))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user