Help NPC! Disconnect
#2

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;
}
Reply


Messages In This Thread
Help NPC! Disconnect - by danish007 - 26.06.2014, 07:51
Re: Help NPC! Disconnect - by Riwerry - 26.06.2014, 09:24

Forum Jump:


Users browsing this thread: 1 Guest(s)