23.04.2013, 10:09
Not sure if you still need help with this lol, anyways try this:
pawn Код:
#if BOT_FEATURE == true
ChatTimer = SetTimer("BotChat", 1000*60*1, true);
#endif
#if BOT_FEATURE == true
if(fexist("JakAdmin/Config/botdialogue.txt"))
{
new File:dialogue;
new str[256];
dialogue = fopen("JakAdmin/Config/botdialogue.txt", io_read);
while(fread(dialogue, str, sizeof(str), false))
{
new idx;
strmid(Chats[ChatCount], str, 0, strlen(str)-1, 200);
ChatCount++;
}
print("Bot Dialogue has been loaded!");
}
else
{
print("Bot Dialogue has not been loaded!");
}
#endif
#if BOT_FEATURE == true
forward BotChat();
public BotChat()
{
if(ccount == sizeof(Chats)) ccount = 0;
new str[256];
format(str, sizeof(str), "%s: "white"%s", BOT_NAME, Chats[ccount]);
SendClientMessageToAll(COLOR_GREEN, str); //Change the colour!
format(str, sizeof(str), "%s: %s", BOT_NAME, Chats[ccount]);
printf(str);
return 1;
}
#endif