How To Add A TIP Bot
#5

I don't think he meant an NPC. Try this:
pawn Код:
public OnGameModeInit() {
   SetTimer("TipBot", (60000 * 10), true);
}

forward TipBot();
public TipBot() {
    new message = random(6);
    switch(message) {
        case 0: SendClientMessageToAll(COLOR_WHITE, "Tipbot: message 1");
        case 1: SendClientMessageToAll(COLOR_WHITE, "Tipbot: message 2");
        case 2: SendClientMessageToAll(COLOR_WHITE, "Tipbot: message 3");
        case 3: SendClientMessageToAll(COLOR_WHITE, "Tipbot: message 4");
        case 4: SendClientMessageToAll(COLOR_WHITE, "Tipbot: message 5");
        case 5: SendClientMessageToAll(COLOR_WHITE, "Tipbot: message 6");
        case 6: SendClientMessageToAll(COLOR_WHITE, "Tipbot: message 7");
    }
}
To add more, just increase the number in the brackets of the random function, and add more cases to the switch method.
Reply


Messages In This Thread
How To Add A TIP Bot - by wes231 - 29.02.2012, 17:38
Re: How To Add A TIP Bot - by Mike_Peterson - 29.02.2012, 17:40
Re: How To Add A TIP Bot - by wes231 - 29.02.2012, 17:54
Re: How To Add A TIP Bot - by Mike_Peterson - 29.02.2012, 17:57
Re: How To Add A TIP Bot - by jameskmonger - 29.02.2012, 18:03

Forum Jump:


Users browsing this thread: 1 Guest(s)