irc multi bot! help for +rep
#2

uhm...

use a variable, increase it each time a bot has said something.

when the variable is 0; let WindyBot say something;
when the variable is 1; let CandyBot say something;

or perhaps when the number is like: 2, 4, 6, 8, 10 etc; it'll use WindyBot; if it's 1, 3, 5, 7 etc; it'll use CandyBot;
like:
pawn Код:
new botcount = 0; // ontop of script.
// in callback
new botname[ 9 ];
botname = ( ( botcount % 2 == 0 ) ? ( "WindyBot" ) : ( "CandyBot" ) );
botcount++;
or you could do it randomly;

random example for connecting:
pawn Код:
new
    rand = random( 2 ),
    str[ 64 ],
    name[ MAX_PLAYER_NAME ],
    botname[ 9 ]
;
GetPlayerName( playerid, name, sizeof( name ) );
botname = ( rand == 0 ? ( "WindyBot"  ) : ( "CandyBot" ) );
format( str, sizeof( str ), "%s: %s has connected to the server!", botname, name );
SendClientMessageToAll( 0xFFFFFFFFFF, str );
Reply


Messages In This Thread
irc multi bot! help for +rep - by KillerStrike23 - 07.05.2014, 18:46
Re: irc multi bot! help for +rep - by Smileys - 07.05.2014, 18:54
Re: irc multi bot! help for +rep - by Vince - 07.05.2014, 19:03
Re: irc multi bot! help for +rep - by Smileys - 07.05.2014, 19:06
Re: irc multi bot! help for +rep - by KillerStrike23 - 08.05.2014, 18:19
Re: irc multi bot! help for +rep - by KillerStrike23 - 08.05.2014, 20:33
Re: irc multi bot! help for +rep - by Vince - 08.05.2014, 21:33
Re: irc multi bot! help for +rep - by KillerStrike23 - 02.06.2014, 15:01

Forum Jump:


Users browsing this thread: 1 Guest(s)