|02/07/2012, 10:42 AM||#1|
Random Messages Using y_timers
Create Random Messages Using y_timers
YSI contains libraries that has more functions then what you think, these functions are designed to save us time and speed up our script, one of these libraries is the y_timers library, when i first begun scripting about 2 years ago i was still using normal timers which is a performance issue if you have more then 10 timers, why ? well because this big amount of timers has a very HUGE impact on you Gamemode's performance, nevertheless i wasn't aware of y_timers until 2 days ago i was looking around the YSI topic and found, because my work was based on using, y_ini, y_commands, so i forgot about the others and how handy the come if you use them wisely. However in this tutorial i am going to teach you how to save time and a little bit of space by using the tasks function in the y_timers, you may now wonder what is tasks, well tasks are simply functions that Gets called at the amount of time you specify, enough talking, let's get working.
What Do We Need ?
Before we start the tutorial we need y_timers, which can be found in the YSI library which can be found Here
Let's Get Started
Open a new clean .pwn document and add the followings on top :
Now under your includes define the color that will be used when sending the Random Messages to the players, simply add.
Now we are going to create an array for our Random Messages, that will contain the random messages, like the following
Now anywhere in your script add the following function (the task function)
That is it you now have the simplest Random Message system.
Y_Less - YSI & y_timers
|Thread||Thread Starter||Forum||Replies||Last Post|
|[Tutorial] Random Messages (Yes another one)||FireCat||Tutorials||16||09/01/2013 04:39 AM|
|need help with random messages||Woozie®||Help Archive||6||26/07/2011 03:23 PM|
|[HELP] Random Messages||Monster[HD]||Help Archive||2||16/04/2011 08:32 PM|
|[FilterScript] P-Messages [Random Messages system]||Pooh7||Filterscripts||5||30/11/2010 04:43 PM|
|How Can i put random messages||[SU]CHRiS||Help Archive||8||03/02/2010 10:27 PM|