[bot] Implement n_IsPlayerStreamedIn(...)

This commit is contained in:
RD42 2024-06-08 21:52:14 +08:00
parent 4cf1e83080
commit 36792cec63
3 changed files with 13 additions and 2 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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)