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

0 Members and 5 Guests are viewing this topic.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #15 on: August 28, 2014, 08:45:47 AM »
I don't know what "methin' is on top of your posted code, but try to remove it and try again.
Out of the Garry's Mod business.

Offline ChaosWolf

  • Jr. Member
  • **
  • Posts: 94
  • Karma: 2
  • "The Exiled One's" Server Owner
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #16 on: August 28, 2014, 02:27:24 PM »
There's that sharp eye again, thanks Neku that did the trick, though, im not sure why it called for an '=' rather then calling a nil value lua:1:

feel free to disregard its only my curiosity as I am still a modest amateur in regards to lua.
"Someone once told me, scripting lua is like trying to build a rocket ship, once your finished with it and think your done, you start it up only to realize you had just built it upside down." ~Programmer

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #17 on: August 28, 2014, 11:36:03 PM »
Geez, I saw that too and thought it was a "methinks" not intended inside the BB code tag.
You actually had it in your lua file? Wow.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #18 on: August 28, 2014, 11:40:40 PM »
Geez, I saw that too and thought it was a "methinks" not intended inside the BB code tag.
You actually had it in your lua file? Wow.

As soon as we assume...  ;)
Out of the Garry's Mod business.

Offline ChaosWolf

  • Jr. Member
  • **
  • Posts: 94
  • Karma: 2
  • "The Exiled One's" Server Owner
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #19 on: August 28, 2014, 11:41:55 PM »
so should I start begging for forgivness now orrrrr???
"Someone once told me, scripting lua is like trying to build a rocket ship, once your finished with it and think your done, you start it up only to realize you had just built it upside down." ~Programmer

Offline axeboy1778

  • Newbie
  • *
  • Posts: 6
  • Karma: -1
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #20 on: September 17, 2014, 03:30:04 AM »
Constantly getting an error now instead of fetching the GeoIP, anyone know why? [Game] Jake connected from ERR!

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #21 on: September 19, 2014, 12:11:47 PM »
Constantly getting an error now instead of fetching the GeoIP, anyone know why? [Game] Jake connected from ERR!
Is your Server probably blocking outside calls?
Maybe your server can't access ip-api.com it's been and is working fine for me

Offline axeboy1778

  • Newbie
  • *
  • Posts: 6
  • Karma: -1
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #22 on: September 19, 2014, 09:28:19 PM »
It has previously worked, not sure what changed. It just stopped working.

EDIT: I stand corrected, it has since started working. No idea why it stopped working for a while.
« Last Edit: September 19, 2014, 09:39:28 PM by axeboy1778 »

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #23 on: September 20, 2014, 05:56:54 AM »
It has previously worked, not sure what changed. It just stopped working.

EDIT: I stand corrected, it has since started working. No idea why it stopped working for a while.
You can add some debug by editing advjoinleave / lua / autorun / server / ss_advjl.lua.
Search for -- Request was successful
and add following:
Code: [Select]
ServerLog("Response data:" .. data .. "\n")
then it should look like
Code: [Select]
-- Request was successful
ServerLog("Response data:" .. data .. "\n")

Then just connect and paste the output, or maybe it'll return a error that says something.

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Re: Advanced Join and Leave 0.1 (Supporting Sounds, Messages, GeoIP)
« Reply #24 on: November 15, 2014, 11:54:05 AM »
Keeping up with my changes:

Update 1:
Updated, my favorite update!

I've added multi color support via hex colors and support for multiplie parameters to output more information.

You're now able to display more than before on disconnect and join, you can display following things:
Code: [Select]
GEO-IP releated:
!zip!             - Player's zip code, most likely it's empty.
!country!         - Player's country like "Germany".
!countryCode!     - Player's country code like "DE".
!query!         - The IP of the requested info.
!city!             - Player's city.
!org!             - Player's ISP organisation.
!region!         - Player's regions short code like "WEYWTIT" (ok abit shorter).
!lat!             - Player's latitude like "48.75".
!timezone!         - Player's timezone like "Europe/Berlin".
!isp!             - Player's ISP like "mediaways".
!regionName!     - Player's region name like "whateveryouwanttoinsethere".

player releated:
!playername!     - Player's name.
!group!         - Player's current group like "superadmin".
!steamid!         - Player's Steam ID like "STEAM_0:0:37706701".

The new default's will now look like:


Everything you need is in the config, it should be self-explanatory.

Main Post got updated.

Offline Shalmendo

  • Newbie
  • *
  • Posts: 36
  • Karma: 1
Okay so..this is proabably a more general garry's mod question, but i think it applies here as well.

What format do sounds need to be in?
(I'm sure I put them in the right folder)
do you have to put the .wav extension at the end in the 'sound' setting for each of the groups?
how do you make sure the clients download the sounds so they can be played? (or do they have to?)

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
In the addons/advjoinleave/sounds folder.
If it doesn't exists create one, and you need to add the extension like (.wav,.mp3 etc)
The Script automatically adds them to the client download list if added in the config.

Offline Luk | twitch.tv/doctorluk

  • Newbie
  • *
  • Posts: 40
  • Karma: 12
Hello, I'm getting an error when a player gets kicked by the server when using reserved slots. This is the actual kick reason:
Code: [Select]
L 01/16/2015 - 15:48:45: "gaben<1720><STEAM_xxxxxxxx><>" disconnected (reason "[ULX] Reserved slot, sorry!")
and this is the error:

Code: [Select]
[ERROR] addons/advjoinleave/lua/autorun/server/ss_advjl.lua:128: bad argument #1 to 'pairs' (table expected, got nil)
   2. advjl_ShowDisconnectMessage - addons/advjoinleave/lua/autorun/server/ss_advjl.lua:128
    3. advjl_PreHandleJoinLeftMessage - addons/advjoinleave/lua/autorun/server/ss_advjl.lua:213
     4. fn - addons/advjoinleave/lua/autorun/server/ss_advjl.lua:237
Host of Spielwiese der Erwachsenen, a German TTT Server for adults only.

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Hello, I'm getting an error when a player gets kicked by the server when using reserved slots. This is the actual kick reason:
Code: [Select]
L 01/16/2015 - 15:48:45: "gaben<1720><STEAM_xxxxxxxx><>" disconnected (reason "[ULX] Reserved slot, sorry!")
and this is the error:

Code: [Select]
[ERROR] addons/advjoinleave/lua/autorun/server/ss_advjl.lua:128: bad argument #1 to 'pairs' (table expected, got nil)
   2. advjl_ShowDisconnectMessage - addons/advjoinleave/lua/autorun/server/ss_advjl.lua:128
    3. advjl_PreHandleJoinLeftMessage - addons/advjoinleave/lua/autorun/server/ss_advjl.lua:213
     4. fn - addons/advjoinleave/lua/autorun/server/ss_advjl.lua:237

Fixed please redownload it from github (the link at the start post)

Offline allofmywutsteam

  • Full Member
  • ***
  • Posts: 136
  • Karma: 3
  • MNWO Owner
    • MNWO Discord
In the addons/advjoinleave/sounds folder.
If it doesn't exists create one, and you need to add the extension like (.wav,.mp3 etc)
The Script automatically adds them to the client download list if added in the config.

1. Does it need to be in the 'sound' or 'sounds' folder? You switched it up right there for a second. I'm going to assume 'sound' since that's whats started in the config

2. I have my sound 'pop.mp3' in the playsound config, I have the file in addons/advjoinleave/sound/advjl/pop.mp3, and I even synced my FTP to ensure its hosted. But the sound doesn't play. All other text-based changes showed up immediately, but would this one require a reboot?

The sound in question: http://monicasnwo.site.nfoservers.com/server/sound/advjl/pop.mp3
Config in question: http://puu.sh/h5yW0/54240d8e32.png

Think I just needed to reboot because I heard it last night. Great addon!
« Last Edit: April 09, 2015, 06:11:23 AM by allofmywutsteam »
"Then Jesus said to his disciples, 'Whoever wants to be my disciple must deny themselves and take up their cross and follow me.'" - Matthew 16:24



MNWO: Steam | Discord | Website | Join Server