ULX

Author Topic: Advanced Join and Leave (Supporting Sounds, Messages, GeoIP, Multi Coloring!)  (Read 35711 times)

0 Members and 4 Guests are viewing this topic.

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Oi' mates, today I wanna present you my shiny addon.

This addon allows you to add fancy join messages and sounds in seconds!

It's a bit more advanced so it supports GeoIP (showing location in messages) & sounds (playing them on join / left) and it's group based it also supports the common admin addons.

Without further talking, the addon is still simple.
Just copy the extracted folder in your addons folder and here you go, some groups are already set-up.

If you want to add your own groups then you can go ahead and examine the config file which is located at "advjoinleave\lua\autorun\server\ss_advjl_config.lua"

How to add group or modify groups?
It's simple, first open the config file.

Then you'll find this in a table:
Code: [Select]
{
    groupnames = {"superadmin", "admin", "operator"}, -- Group(s) which will use the message.
    receivers = nil, -- This is a list of groups which will receive the messages.
    resolvegeodata = true, -- If you want to resolve geo data for this message (REQUIRED FOR GEO-IP RELEATED MESSAGES!)

    sounds = {
        join = "",
        leave = ""
    },

    messages = {
        join = "#FFFFFF[#9C7878JOIN:#FFFFFF] !playername! joined our server from #FFFFFF[#9C7878!countryCode!#FFFFFF]",
        leave = "#FFFFFF[#9C7878LEFT:#FFFFFF] !playername![!steamid!] left us."
    }
},

Now, this is the template for the admin groups you can easily copy that and modify it to suit your needs just take care that you don't forget to add a ", (semicolon)" at the end of every line if one follows after.

If we want every in the group "donator" to play a sound located in the "sound/advjl" folder then we need to make it look like that:
Code: [Select]

{
    groupnames = {"donator"}, -- Group(s) which will use the message.
    receivers = nil, -- This is a list of groups which will receive the messages.
    resolvegeodata = true, -- If you want to resolve geo data for this message (REQUIRED FOR GEO-IP RELEATED MESSAGES!)

    sounds = {
        join = "donatorjoin.wav",
        leave = ""
    },

    messages = {
        join = "#FFFFFF[#9C7878JOIN:#FFFFFF] !playername! joined our server from #FFFFFF[#9C7878!countryCode!#FFFFFF]",
        leave = "#FFFFFF[#9C7878LEFT:#FFFFFF] !playername![!steamid!] left us."
    }
},
The rest should be pretty clear.

Changelog:
20/5/2016- Refactored a bit (code looks less ugly now)
- Added multi-group support
- Added message receivers (a list of groups which should receive the join message useful for admin only messages)
11/2/2014
- Added Multicolor support.
- Added a way to add more information to the messages.
11/14/2014
- Fixed "#" in names causing the message to not show.
- Added Muting of sounds on mapchange.

Download(s):
Github (newest Version)
Github (for contributions)
« Last Edit: July 06, 2016, 03:41:03 PM by Fanney »

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Can this be configured for different groups? For example i don't want it displayed when admins join or leave.

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Can this be configured for different groups? For example i don't want it displayed when admins join or leave.
You can just keep "messageformat" and "messageformatdc" blank.

You can find the config in this Folder ("addons\advjoinleave\lua\autorun\server\ss_advjl_config.lua")

Just edit those two:
Code: [Select]
{groupname="superadmin", playsound="superadminjoin.wav", leftsound="", messageformat="[JOIN:] %s our shiny Owner from [%s] connected!", messageformatdc="[DISCONNECT:] %s left us!", resolvecountry=true},
{groupname="admin", playsound="adminjoin.wav", leftsound="",  messageformat="[JOIN:] %s our shiny Admin from [%s] connected!", messageformatdc="[DISCONNECT:] %s left us!", resolvecountry=true},
   
to
Code: [Select]
{groupname="superadmin", playsound="", leftsound="", messageformat="", messageformatdc="", resolvecountry=false},
{groupname="admin", playsound="", leftsound="",  messageformat="", messageformatdc="", resolvecountry=false},

Offline Marz

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Broken?
« Reply #3 on: July 03, 2014, 01:11:46 AM »
This is broken for me when I try extract it.

If you could re-upload or upload else where I would love you.

-Lewis

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Marz, file extracts for me and many others just fine.
What program are you trying to use to extract it?
What do you mean "broken"? What errors?
Sounds like a PC program or internet issue, nothing to do with the link/hosted file.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Marz, file extracts for me and many others just fine.
What program are you trying to use to extract it?
What do you mean "broken"? What errors?
Sounds like a PC program or internet issue, nothing to do with the link/hosted file.
It's some nasty problem with WinRAR or other programs, i packed the file with 7zip's ultra compression.

New packed version in attachments.

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #6 on: July 11, 2014, 12:37:05 PM »
I updated the addon and fixed a rare NULL ENTITY error, also i re-formatted the config abit.

Offline Dawnkiller

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • FawX Gaming
    • FawX Gaming
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #7 on: July 13, 2014, 01:40:50 AM »
This looks great, looking forward to putting this on my server!

However one problem, I can't find the sounds anywhere. I've looked in the folder and it's empty for me.

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #8 on: July 13, 2014, 06:40:06 AM »
However one problem, I can't find the sounds anywhere. I've looked in the folder and it's empty for me.
Sounds are not included by default, if you want to put some in then put them there (addons/advjoinleav/sound/advjl) and add the soundname in the config under either playsound or leftsound.

Offline eagle9er9er

  • Jr. Member
  • **
  • Posts: 50
  • Karma: 0
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #9 on: July 18, 2014, 08:03:00 PM »
Doesn't work for me, I added the folder to addons, edited the config a little bit and nothing shows up in chat when people join. No errors, no messages, nothing.

Edit: So it works when people leave, but this is the error when people join.

Lua Error: [ERROR] addons/advjoinleave/lua/autorun/server/ss_advjl.lua:186: bad argument #1 to 'Simple' (number expected, got nil) 1. Simple - [C]:-1 2. fn - addons/advjoinleave/lua/autorun/server/ss_advjl.lua:186 3. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
« Last Edit: July 18, 2014, 08:23:53 PM by eagle9er9er »

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #10 on: July 21, 2014, 01:59:12 AM »
Doesn't work for me, I added the folder to addons, edited the config a little bit and nothing shows up in chat when people join. No errors, no messages, nothing.

Edit: So it works when people leave, but this is the error when people join.

Lua Error: [ERROR] addons/advjoinleave/lua/autorun/server/ss_advjl.lua:186: bad argument #1 to 'Simple' (number expected, got nil) 1. Simple - [C]:-1 2. fn - addons/advjoinleave/lua/autorun/server/ss_advjl.lua:186 3. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
Sorry for late Response, should be fixed in the lastest Download

Offline eagle9er9er

  • Jr. Member
  • **
  • Posts: 50
  • Karma: 0
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #11 on: July 21, 2014, 08:35:43 PM »
Sorry for late Response, should be fixed in the lastest Download

Thanks so much this addon is awesome.

Offline dylanr423

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #12 on: July 29, 2014, 08:53:22 PM »
There is no sound folder? Help?

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #13 on: July 30, 2014, 06:55:13 AM »
There is no sound folder? Help?
Just create the Folder in addons\advjoinleave\

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given