18.03.2011, 02:25
Two ways i can think off hand (i havent realy worked with npcs before).
EDIT: The other way was very poor.
pawn Код:
#define MAX_BOTS (15)
new BotIDS[MAX_BOTS] = {INVALID_PLAYER_ID, ...};//array to store npc ids
public OnPlayerConnect(playerid)
{
static
BotCount;
if(IsPlayerNPC(playerid))
{
BotIDS[BotCount] = playerid;
BotCount++;
}
return 1;
}