SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 24/02/2013, 12:25 PM   #1
roar
Huge Clucker
 
roar's Avatar
 
Join Date: May 2009
Location: Indonesia
Posts: 297
Reputation: 17
Default Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!

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.
__________________
Quote:
Experience is your best teacher
roar is offline   Reply With Quote
Old 24/02/2013, 11:13 PM   #2
yancarlos4500
Big Clucker
 
Join Date: Feb 2013
Posts: 113
Reputation: 2
Default Re: Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!

nice
yancarlos4500 is offline   Reply With Quote
Old 25/02/2013, 03:25 AM   #3
carz0159
High-roller
 
carz0159's Avatar
 
Join Date: Mar 2012
Location: New Jersey, USA
Posts: 1,145
Reputation: 70
Default Re: Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!

nice, make only one option though, no need for exit and continue...
carz0159 is offline   Reply With Quote
Old 26/02/2013, 07:24 AM   #4
roar
Huge Clucker
 
roar's Avatar
 
Join Date: May 2009
Location: Indonesia
Posts: 297
Reputation: 17
Default Re: Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!

Thanks for the comments!
__________________
Quote:
Experience is your best teacher
roar is offline   Reply With Quote
Old 26/02/2013, 07:42 AM   #5
rangerxxll
Gangsta
 
rangerxxll's Avatar
 
Join Date: Aug 2011
Posts: 882
Reputation: 59
Default Re: Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!

Not bad. Keep learning, it gets easier as you go. I promise.
__________________

Server Website: http://www.pgagaming.net/forums/
Server IP:87.98.241.207:7024
rangerxxll is offline   Reply With Quote
Old 26/02/2013, 07:55 AM   #6
Gamer_007
Gangsta
 
Gamer_007's Avatar
 
Join Date: Dec 2011
Location: Connecting...
Posts: 670
Reputation: 11
Default Re: Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!

Nice for a newbie.Go ahead,but isnt it so simple?? Add some more random message.
Gamer_007 is offline   Reply With Quote
Old 26/02/2013, 08:50 AM   #7
roar
Huge Clucker
 
roar's Avatar
 
Join Date: May 2009
Location: Indonesia
Posts: 297
Reputation: 17
Default Re: Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!

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!
__________________
Quote:
Experience is your best teacher
roar is offline   Reply With Quote
Old 26/02/2013, 10:48 AM   #8
Gamer_007
Gangsta
 
Gamer_007's Avatar
 
Join Date: Dec 2011
Location: Connecting...
Posts: 670
Reputation: 11
Default Re: Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!

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]

Last edited by Gamer_007; 26/02/2013 at 11:31 AM.
Gamer_007 is offline   Reply With Quote
Old 26/02/2013, 11:01 AM   #9
RiChArD_A
Gangsta
 
RiChArD_A's Avatar
 
Join Date: Jul 2012
Location: Florida
Posts: 683
Reputation: -105
Default Respuesta: Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!

This is grate. If I'll use it? Yeah!
__________________
RiChArD_A is offline   Reply With Quote
Old 26/02/2013, 11:39 AM   #10
CountryTrooper441
Huge Clucker
 
CountryTrooper441's Avatar
 
Join Date: Nov 2012
Location: Connecticut
Posts: 224
Reputation: 32
Default Re: Server Message [SERVER TIPS, SERVER MESSAGE OF THE DAY] - Simple, basic but editable!

+Rep
CountryTrooper441 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP Message : .... Has joined the server firemanjv Scripting Help 4 26/12/2012 09:48 AM
Message On my Server.exe How to fix? NeverKnow Server Support 0 05/01/2012 02:48 PM
[Help]Joined the server message! Blade_Cervetti Help Archive 1 14/12/2009 05:06 AM
Server disconnects without message noahg Server Support 1 25/11/2009 09:34 PM
How to leave message in the server? need help. Konrads Help Archive 6 11/04/2009 02:06 PM


All times are GMT. The time now is 02:44 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.