[bot] Implement n_IsPlayerConnected(...)

This commit is contained in:
RD42
2024-06-01 18:40:37 +08:00
parent 0e726e656e
commit e4770acd44
3 changed files with 10 additions and 2 deletions

View File

@ -248,8 +248,9 @@ static cell AMX_NATIVE_CALL n_GetPlayerName(AMX *amx, cell *params)
// native IsPlayerConnected(playerid)
static cell AMX_NATIVE_CALL n_IsPlayerConnected(AMX *amx, cell *params)
{
// TODO: n_IsPlayerConnected
return 0;
PLAYERID playerId = (PLAYERID)params[1];
if (playerId >= MAX_PLAYERS || pNetGame->GetPlayerPool()->GetSlotState(playerId)) return 0;
return 1;
}
//----------------------------------------------------------------------------------