How to create a random text message that appears every 30 min?
#1

Hello.

I have been searching around and couldn't find anything. Anyone know a code for like having a text message to come up on the server every 30min like "Need help use /helpme" I want that to come up every 30 min anyone willing to help me?
Reply
#2

I think you haven't searched enough!

Here is a link.
Reply
#3

pawn Код:
//Top of your script
new infotimer;
new InfoMessage;

forward Information();

//Put this under OnGameModeInit
infotimer = SetTimer("Information", 1800000, true);


//Put this under OnGameModeExit
KillTimer(infotimer);

//Put this somewhere in your script
public Information()
{
    switch(InfoMessage){
        case 0:
        {
            SendClientMessageToAll(color, "Saw cheater type /report id reason ");
            InfoMessage = 1;
        }
        case 1:
        {
            SendClientMessageToAll(color, "");
            InfoMessage = 2;
        }
        case 2:
        {
            SendClientMessageToAll(color, "");
            InfoMessage = 3;
        }
        case 3:
        {
            SendClientMessageToAll(color, "");
            InfoMessage = 4;
        }
        case 4:
        {
            SendClientMessageToAll(color, "");
            InfoMessage = 5;
        }
        case 5:
        {
            SendClientMessageToAll(your color, "");
            InfoMessage = 6;
        }
        case 6:
        {
            SendClientMessageToAll(your color, "");
            InfoMessage = 7;
        }

    }
    return 1;
}
Next time use search. I'm sure there are tons of this scripts.
Reply
#4

Quote:
Originally Posted by Cypress
Посмотреть сообщение
pawn Код:
//Top of your script
new infotimer;
new InfoMessage;

forward Information();

//Put this under OnGameModeInit
infotimer = SetTimer("Information", 300000, true);


//Put this under OnGameModeExit
KillTimer(infotimer);

//Put this somewhere in your script
public Information()
{
    switch(InfoMessage){
        case 0:
        {
            SendClientMessageToAll(color, "Saw cheater type /report id reason ");
            InfoMessage = 1;
        }
        case 1:
        {
            SendClientMessageToAll(color, "");
            InfoMessage = 2;
        }
        case 2:
        {
            SendClientMessageToAll(color, "");
            InfoMessage = 3;
        }
        case 3:
        {
            SendClientMessageToAll(color, "");
            InfoMessage = 4;
        }
        case 4:
        {
            SendClientMessageToAll(color, "");
            InfoMessage = 5;
        }
        case 5:
        {
            SendClientMessageToAll(your color, "");
            InfoMessage = 6;
        }
        case 6:
        {
            SendClientMessageToAll(your color, "");
            InfoMessage = 7;
        }

    }
    return 1;
}
Next time use search. I'm sure there are tons of this scripts.
This won't really work as supposed, as there is no 7th InfoMessage, also it is not random.
Reply
#5

If you want a working and easy-to-use filterscript, try this: https://sampforum.blast.hk/showthread.php?tid=186569

If you'd rather make your own code (What I'd support myself), I hope this helps you: https://sampforum.blast.hk/showthread.php?tid=185649
Reply
#6

Quote:
Originally Posted by TheXIII
Посмотреть сообщение
This won't really work as supposed, as there is no 7th InfoMessage, also it is not random.
Did you tried it before saying anything? It works fine for me.
Reply
#7

Thanks guys I will search a bit more next time!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)