07.05.2014, 18:54
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:
or you could do it randomly;
random example for connecting:
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++;
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 );