26.06.2014, 09:24
I'm not really sure if it'll work, haven't tested it, but I think it should:
pawn Код:
#define YOUR_NPC_COUNT 17 //Edit count of NPCs if necessary
static const stock NPC_NAMES[][] = { //Just edit and add names of your NPCs to quotes
"Joe",
"Nick",
"..."
};
public OnGameModeExit() {
new
name[MAX_PLAYER_NAME];
for (new i, j; i < MAX_PLAYERS, j != YOUR_NPC_COUNT; i++) {
GetPlayerName(i, name, sizeof (name));
if (!strcmp(name, NPC_NAMES[j])) {
//We've found NPC
Kick(i);
j++;
}
}
return 1;
}