Bot shoutout
#1

Say every 1 minute, a random bot (i have 7) loops through all players and picks a random person. When the person talks, I want a random bot to say "stfu, %s" ( %s = person who talked).

Then the next minute, I want another random bot to pick another random person and say another random thing.

How would I do it? There are examples on Garsino's fun server, crazybobs, and some others, but I'm not too sure how to make it.
Reply
#2

init
pawn Код:
SetTimer("RandomTalk",60000,true);
pawn Код:
forward RandomTalk();
public RandomTalk()
{
    new botid = Iter_Random(Bot);
    new randomid = Iter_Random(Player);
    new str[128],bot[24],nick[24];
    GetPlayerName(botid,bot,24);
    GetPlayerName(randomid,nick,24);
    format(str,sizeof(str),"%s: stfu %s",bot,nick);
    SendClientMessage(randomid,-1,str);
    //or
    //format(str,sizeof(str),"stfu %s",nick);
    //SendPlayerMessageToPlayer(botid,randomid,str);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)