diff --git a/bot/net/netgame.cpp b/bot/net/netgame.cpp index 464b61b..31ebfff 100644 --- a/bot/net/netgame.cpp +++ b/bot/net/netgame.cpp @@ -46,6 +46,15 @@ BYTE byteMySeatID; bool bSpawned = false; +//---------------------------------------------------- +// MATCH +BOOL CNetGame::IsPlayerAdded(PLAYERID playerId) +{ + if(playerId >= MAX_PLAYERS) return FALSE; + + return bPlayerSlotState[playerId] != FALSE; +} + //---------------------------------------------------- // MATCH void CNetGame::SetMyZAngle(float fAngle) diff --git a/bot/net/netgame.h b/bot/net/netgame.h index d7760bc..aa8af80 100644 --- a/bot/net/netgame.h +++ b/bot/net/netgame.h @@ -96,6 +96,7 @@ public: void ShutdownForGameModeRestart(); void sub_415EC0(VEHICLEID VehicleID, BOOL a2); + BOOL IsPlayerAdded(PLAYERID playerId); void SetMyZAngle(float fAngle); void SetPlayerAdded(PLAYERID playerId, BOOL a2); diff --git a/bot/scrcustom.cpp b/bot/scrcustom.cpp index f50d9dc..ee7532f 100644 --- a/bot/scrcustom.cpp +++ b/bot/scrcustom.cpp @@ -178,8 +178,9 @@ static cell AMX_NATIVE_CALL n_GetPlayerSpecialAction(AMX *amx, cell *params) // native IsPlayerStreamedIn(playerid) static cell AMX_NATIVE_CALL n_IsPlayerStreamedIn(AMX *amx, cell *params) { - // TODO: n_IsPlayerStreamedIn - return 0; + if(!pNetGame->GetPlayerPool()->GetSlotState((PLAYERID)params[1])) return 0; + + return pNetGame->IsPlayerAdded((PLAYERID)params[1]); } // native IsVehicleStreamedIn(vehicleid)