Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

2 years ago

Advertisement
April 20, 2019, 12:24:24 pm

Author Topic: GK7_Motd - Display Motd/Rules on player join [V1.4]  (Read 24044 times)

[GK7]Nakroma

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
GK7_Motd - Display Motd/Rules on player join [V1.4]
« on: December 21, 2013, 01:31:02 pm »
GK7_Motd

GK7_Motd Download

Features
- Open MOTD on player join
- Open it again with a command or key
- Highly configurable

Setup
1. Choose a download link
2. Download the .zip from GitHub
3. Extract the .zip
4. Copy the 'gk7_motd' folder into your /scripts/ folder

Configure it
Go into your /scripts/gk7_motd/client/ and open gk7_motd.lua with notepad.
On line 5 you will find the config, it's really self explanatory.
If you want to change the /motd command, you can if you go into /scripts/gk7_motd/server/ and open gk7_motd.lua with notepad go to line 16 and change "/motd" to "/yourcommand".



Changelog
13.01.14 - V1.4:
  • - Added option don't spawn player until Motd is closed (thanks to @Jman100)

07.01.14 - V1.3:
  • - Added a configurable openkey
  • - Added color example

26.12.13 - V1.2.1:
  • - Added a serverside config

23.12.13 - V1.2:
  • - Added an option to let the player use controls while the MOTD is active

21.12.13 - V1.1:
  • - Couple of bugfixes
  • - Edited config section for more understandability

21.12.13 - V1.0
« Last Edit: January 13, 2014, 08:36:04 pm by [GK7]Nakroma »

fahrstuhl1

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #1 on: December 21, 2013, 01:35:42 pm »
your download link is broken
« Last Edit: December 21, 2013, 01:37:19 pm by fahrstuhl1 »

[GK7]Nakroma

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #2 on: December 21, 2013, 01:42:39 pm »
Sorry fixed it.

Proking

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #3 on: December 21, 2013, 01:54:49 pm »
please provide me other link.
Adf.ly is blocked in my country.

[GK7]Nakroma

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #4 on: December 21, 2013, 01:58:03 pm »
It is already

fahrstuhl1

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #5 on: December 21, 2013, 01:58:55 pm »
uhm, there is a little problem. after a few words the rest aren't showen properly  (added screenshot)

« Last Edit: December 21, 2013, 02:01:09 pm by fahrstuhl1 »

[GK7]Nakroma

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #6 on: December 21, 2013, 02:34:26 pm »
This is quite embarassing, I put that up for testing and didnt remove it.
Download it again, I fixed it now. Or (faster) go into client/gk7_motd.lua and change line 40 to this:
Code: [Select]
self.contents2:SetSize( Vector2( self.window:GetSize().x, 32 ) )

fahrstuhl1

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #7 on: December 21, 2013, 03:23:25 pm »
changed it manually and it works. Thanks! As a nice greeting and a small overview for new players this script is perfect, thanks for your work.

rAv3nzZ

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #8 on: December 21, 2013, 04:02:21 pm »
Failed to load module gk7motd: Module can't be loaded because the path does not exist.

What should i do?

[GK7]Nakroma

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #9 on: December 21, 2013, 04:07:01 pm »
Failed to load module gk7motd: Module can't be loaded because the path does not exist.

What should i do?

What is your path?
Make sure it looks like this:
Code: [Select]
\scripts\gk7_motd\client\gk7_motd.lua
Code: [Select]
\scripts\gk7_motd\server\gk7_motd.lua

rAv3nzZ

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #10 on: December 21, 2013, 05:59:52 pm »
Failed to load module gk7motd: Module can't be loaded because the path does not exist.

What should i do?

What is your path?
Make sure it looks like this:
Code: [Select]
\scripts\gk7_motd\client\gk7_motd.lua
Code: [Select]
\scripts\gk7_motd\server\gk7_motd.lua

Okay, now it gives me
Code: HTML5
  1. 15:57:11 | [info ] | Loading module gk7_motd
  2. 15:57:11 | [info ] |    Loading script "server\gk7_motd.lua"
  3. 15:57:11 | [info ] | Module gk7_motd loaded successfully

But it doesn't show up at the beginning, either when i write the command.

ZMax

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #11 on: December 21, 2013, 06:02:11 pm »
GREAT SCRIPT!

Now, a question I've got: (first of all, can this even be done in JC2-MP?)
Like Garry's Mod ULX Addon, can you put a URL from the interwebz or an HTML file from your computer into this MOTD?

[GK7]Nakroma

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #12 on: December 21, 2013, 06:25:08 pm »
GREAT SCRIPT!

Now, a question I've got: (first of all, can this even be done in JC2-MP?)
Like Garry's Mod ULX Addon, can you put a URL from the interwebz or an HTML file from your computer into this MOTD?

Hello, first of all thanks for your feedback.
To your question, actually this what I had in mind when I wrote this script. The problem is GMOD uses "their" vgui to do that(http://wiki.garrysmod.com/page/VGUI/Elements/HTML)and, as far as I know, this is not possible in JC2:MP.

Okay, now it gives me
Code: HTML5
  1. 15:57:11 | [info ] | Loading module gk7_motd
  2. 15:57:11 | [info ] |    Loading script "server\gk7_motd.lua"
  3. 15:57:11 | [info ] | Module gk7_motd loaded successfully

But it doesn't show up at the beginning, either when i write the command.

Can you post a screenshot of your script location?

rAv3nzZ

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #13 on: December 21, 2013, 06:43:31 pm »
Nevermind, i'm sorry. I don't know why but when i reinstalled it, everything worked fine. I think that's because of bad format of the rules text i made. Thanks anyways and great script, good job!

Also, i'm wondering if there's any way to insert links in there so i could add the steam group there and onclick, the steam overlay will came up with the steam group loaded up in steam browser.

[GK7]Nakroma

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: GK7_Motd - Display Motd/Rules on player join [V1.0]
« Reply #14 on: December 21, 2013, 06:49:08 pm »
Nevermind, i'm sorry. I don't know why but when i reinstalled it, everything worked fine. I think that's because of bad format of the rules text i made. Thanks anyways and great script, good job!

Also, i'm wondering if there's any way to insert links in there so i could add the steam group there and onclick, the steam overlay will came up with the steam group loaded up in steam browser.

You can add a button (I think) which links your group, but having it in the window is not possible, as far as I know, right now.