Automatic messages
#1

Hello guys, how can i make an automatic message that will appear ine the chat every 20 minutes
Reply
#2

Few messages? random messages? one message at time?
Reply
#3

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Few messages? random messages? one message at time?
one random message every 10 minutes
Reply
#4

pawn Код:
#include                            "a_samp"

#define MINUTES(%1)                 ((%1)*(60*1000))

new RandomMessages[][] =
{
    "Your random messages here",
    "I",
    "Love",
    "You Riddick!" // after last you can't put ','
};

public OnGameModeInit()
{
    SetTimer("AutomaticMessage", MINUTES(10), true);
    return true;
}

forward AutomaticMessage();
public  AutomaticMessage()
{
    new RandomMessage = random(sizeof(RandomMessages));
    SendClientMessageToAll(-1, RandomMessages[RandomMessage]); // -1 is a colour for a message.
    return true;
}
One fail.. fixed now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)