[LUF 1] Little Useful Functions - Information messages with timer
#1

What's LUF?
LUF is "Little Useful Functions", I made little functions for scripting beginers, so they can add nice functions to their server and of course learn from them!

What's information messages with timer?
It's a little script that sends a message every X time, you can set the time (= explained in tutorial) you want for each message, and you can add all the messages you want, it's realy realy easy, and of course, useful! This is LUF 1, the first script of Little Useful Functions.

Let's start!
__________________________________________________ __________

Go to your script, and press "CTRL+F" to use the search tool, search for "public OnGameModeInit()" word, If you wanna do it on a filterscript, search for "public OnFilterScriptInit", that's the data that is loaded when the game mode or filterscript is loaded.

Add the following text to "public OnGameModeInit"

SetTimer("Message1", 1500000, true); // Message1 is the timer name, 1500000 is the time in wich the text will be show, feel to modify the 1500000.

____

Add this before "public OnGameModeInit()" or "OnFilterScriptInit()"

forward Message1();
public Message1()
{
SendClientMessageToAll(COLOR_WHITE, "YOUR TEXT HERE"); // Feel free to modify COLOR_WHITE to the color you want, if is defined.
SendClientMessageToAll(COLOR_WHITE, "ANOTHER LINE OF TEXT"); // You can add all the lines you want, and delete them
}

_____

You can now compile your script and enjoy!
If you have got problems, just post here

Next LUF
Commands switch off system (For example, you want to desactivate the /help command)
Reply
#2

Yeah.....nice ..
Reply
#3

thx for it, i'm making a stunt and this is good for help bots or something like that, thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)