[FilterScript] Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!
#1

Server Message System

A simple, basic and editable server message system


Introduction
I am currently learning to script as I am also going to work on my own gamemode. Because of that I think I also need to practice a lot more in scripting, starting with the real basic one (this one). So this idea came out when I am going to practice my scripting. It is a simple script, but I hope it is helpful.

What is this about?
This is a simple script that lets you have a textdraw below your map that displays the server tips/random message that might be helpful to the members. It is configurable (you can set your message by your own needing, you can set your time between each message). Other than that you have a simple dialog (when you spawn) showing your server message of the day. I told you it's basic. But don't be hard because this is my first time scripting (well at least I am newbie). Anyway, I've got that all in screenies:






How to configure?
You will see all the instructions inside the script. It is easy.

Download
Pastebin: http://pastebin.com/tMyjU3vX

Credits
Credits goes to me for making the script. With DracoBlue for the DCMD. And Zamaroht for the Textdraw editor.


Anything else?
I hope this simple script I made can be useful for all of newbies like me out there.
Reply
#2

nice
Reply
#3

nice, make only one option though, no need for exit and continue...
Reply
#4

Thanks for the comments!
Reply
#5

Not bad. Keep learning, it gets easier as you go. I promise.
Reply
#6

Nice for a newbie.Go ahead,but isnt it so simple?? Add some more random message.
Reply
#7

Quote:
Originally Posted by rangerxxll
View Post
Not bad. Keep learning, it gets easier as you go. I promise.
Thanks!

Quote:
Originally Posted by Gamer_007
View Post
Nice for a newbie.Go ahead,but isnt it so simple?? Add some more random message.
You can add more random message by your own needing! I was just giving an example of it in the script. Anyway thanks for your comment!
Reply
#8

Quote:
Originally Posted by roar
View Post
Thanks!


You can add more random message by your own needing! I was just giving an example of it in the script. Anyway thanks for your comment!
pawn Code:
new messages[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
  messages[playerid] = 0;
  return 1;
}

CMD:todaymsg(playerid,params[])
{
        TextDrawShowForPlayer(playerid, ServerTips);
        TextDrawShowForPlayer(playerid, MessagesTD);
        ShowPlayerDialog(playerid, MOTD_DIALOG, DIALOG_STYLE_MSGBOX, ""COL_CYAN"Welcome to              "COL_LGREEN""#Server_Name"!", ""COL_CYAN"Our message of the day: "COL_LGREEN""#Server_Motd"", "Continue", "Exit");
        return 1;
}

CMD:messages(playerid,params[])
{
      if(messages[playerid] == 0)
      {
      TextDrawShowForPlayer(playerid, MessagesTD);
      messages[playerid] = 1;
      }
      else
      {
      TextDrawHideForPlayer(playerid, MessagesTD);
      messages[playerid] = 0;
      }
      return 1;
}
A simple cmd to show/hide messages with command.[/QUOTE]
Reply
#9

This is grate. If I'll use it? Yeah!
Reply
#10

+Rep
Reply
#11

Thanks. I will edit this. +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)