login
April 27, 2024, 07:23:26 am

Author Topic: Aligned Random Messages ( Without NewTimer )  (Read 533 times)

0 Members and 1 Guest are viewing this topic.

Inferno69

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • *
  • Posts: 761
  • Country: pk
  • 👀
    • View Profile
    • VFS
Aligned Random Messages ( Without NewTimer )
« on: November 19, 2020, 04:02:54 am »
Features

Quote
• Shows random messages after every 60 seconds without using a timer.
• Will show different message every minute.
• Message #1 will be repeated once it reaches last recorded message i.e Message #10. And so on.
• This snippet doesn't require Random(min,max) function.









OnScriptLoad
Code: [Select]
MSGTick <- 0;
tCount <- 0;


OnTimeChange
Code: [Select]
if(MSGTick < 61) { //check to increase
MSGTick++; // INCREASES EVERY SECOND
}
else if(MSGTick > 59) {  // checks when 1min passes
MSGTick = 0;
tCount ++;
local m1 = "[#ffff00]Add the server to favourites", m2 = "please read /rules",  m3 = "[#FFFFFF]Server made by : YOURNAME";  // You can edit these and add even more messages here make sure to tCount = 0; on last msg.
if(tCount == 1) {
 Message(" "+m1+" ");
}
else if(tCount == 2) {
 Message(" "+m2+" ");
}
else if(tCount == 3) { // 3rd and last msg
 Message(" "+m3+" ");
tCount = 0; // to return to message #1


}
« Last Edit: November 19, 2020, 04:04:59 am by Inferno69 »
Winner Winner x 2 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor