ULX

Poll

Was any of these somewhat interesting or "cool"?

Yes, thank you :)
262 (96.7%)
No, do better next time :(
9 (3.3%)

Total Members Voted: 270

Author Topic: Player Connect/Disconnect Message [1.11v]  (Read 133384 times)

0 Members and 7 Guests are viewing this topic.

Offline Dawnkiller

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • FawX Gaming
    • FawX Gaming
Re: Player Connect/Disconnect message
« Reply #90 on: April 24, 2014, 03:49:35 AM »
Is there any way of changing the volume of these pings? It near as damnit deafens people on mapchange when 20+ people connect at the same time.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Player Connect/Disconnect message
« Reply #91 on: April 24, 2014, 09:25:14 PM »
Just disable the sound.
Out of the Garry's Mod business.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Connect/Disconnect message
« Reply #92 on: April 24, 2014, 11:20:53 PM »
Is there any way of changing the volume of these pings? It near as damnit deafens people on mapchange when 20+ people connect at the same time.

Kinda made me chuckle.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Player Connect/Disconnect message
« Reply #93 on: April 25, 2014, 07:47:33 PM »
Just disable the sound.
May I strongly suggest you tell the person questioning... HOW!?
There is no config file,  No console commands,  No convars for this script. It's not a ULX specific menu addon. It's straight Lua.
Though, yes, you may find it easy and experience shows you how, imagine yourself as a 99.999% Lua newb.
And the only reason you've got the .001% experience is because you've seen the word "Lua".
How then would you consider your answer?
"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: Player Connect/Disconnect message
« Reply #94 on: April 25, 2014, 10:12:30 PM »
Alrighty, go into one of the lua files in here. I don't know which one since it's literally been 6 months since I last used this.

Find the line of code with .wav or .mp3.
Type this in that same line before the code.
Code: [Select]
--
My best guess is that it's in the clientside lua.
Out of the Garry's Mod business.

Offline Dawnkiller

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • FawX Gaming
    • FawX Gaming
Re: Player Connect/Disconnect message
« Reply #95 on: April 28, 2014, 02:03:35 AM »
I appreciate the sentiment JamminR, and understand the principle of helping out newer coders. Luckily, I'm not a complete coding newb, just fairly new to Lua. I'm aware I could just disable the sound by commenting it out but I like having the sound while the round is active, it does a good job of notifying people of joiners, and leavers especially.

I've considered two other options:

1. Remake the base ping sounds in Audacity or whatever to reduce the volume, reupload as a custom sound and change the file path in the Lua.

or

2. Could perhaps add a kind of timing loop/delay that disables the sounds in the first 10 seconds of the map starting? Is that possible?

EDIT:
Kinda made me chuckle.

Which part, the naivety that I could change the volume of a base file, or the deafening pings of death?  :P
« Last Edit: April 29, 2014, 02:46:07 AM by Dawnkiller »

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Player Connect/Disconnect message
« Reply #96 on: April 28, 2014, 02:55:37 PM »
Could you paste the code on that line for me?
Out of the Garry's Mod business.

Offline Dawnkiller

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • FawX Gaming
    • FawX Gaming
Re: Player Connect/Disconnect message
« Reply #97 on: April 29, 2014, 02:44:20 AM »
Code: [Select]
surface.PlaySound( "garrysmod/save_load1.wav" )

Offline peterchamp00

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #98 on: June 27, 2014, 07:33:31 AM »
I just added this to my server and when I was spawning in the server I got a message in the top left of my screen that said "Something is creating script errors." I checked the console and it said Warning: Unhandled usermessage 'player_spawn'. How would I fix this error?

Offline Bob Dylan

  • Newbie
  • *
  • Posts: 10
  • Karma: -5
Re: Player Connect/Disconnect message
« Reply #99 on: June 29, 2014, 04:11:23 AM »
Hey chaos just want to thank you for this addon it has helped me so much and i am using the one that shows the steam id and it works perfectly just requesting though are you able to make a damagelog system for the gamemode jailbreak?

Offline Saucey

  • Newbie
  • *
  • Posts: 12
  • Karma: -2
  • | OHQ Team | GCinema |
    • GCinema
Re: Player Connect/Disconnect message
« Reply #100 on: July 10, 2014, 10:17:30 AM »
Code: [Select]
local Tags =
{
--Group    --Tag     --Color
{"admin", "ADMIN", Color(0, 0, 255, 255) },
{"superadmin", "SUPERADMIN", Color(255, 0, 0, 255) },
{"owner", "OWNER", Color(0, 255, 0, 255) }
}

How you did this code above, I would like for the connections to be displayed like so "[Server] [Admin] Mr. Apple has joined the server!"
I have 8 ranks that I would like to be displayed like how they display in the chat with that code.

I would greatly appreciate that!
« Last Edit: July 10, 2014, 10:20:27 AM by hej »
Quote
Two possibilities exist...
Either we are alone in the universe or we are not.
Both are equally terrifying.

Offline nar308

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #101 on: July 16, 2014, 03:55:10 PM »
Is there a way to only target a specific group only? So that that group is the only one that the notification comes up for. Thanks.

Offline Avoid

  • Full Member
  • ***
  • Posts: 142
  • Karma: 42
Re: Player Connect/Disconnect message
« Reply #102 on: July 16, 2014, 05:13:27 PM »
Hello,
take a look at the code and add something before the message is being shown to the players!
There you could do an if-statement with IsAdmin/IsUserGroup.

My 0.02$, Avoid

Offline nar308

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #103 on: July 19, 2014, 12:13:56 AM »
Thank you for the reply, so would it be something like

if (not IsValid(ply)) or ply:IsSuperAdmin()
then chat.AddText( Color( 255, 0, 255 ), "[Server] ", nickteamcolour1, name1, Color( 255, 255, 255 ), " has joined in the server." )?

Offline nar308

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Player Connect/Disconnect message
« Reply #104 on: July 31, 2014, 04:25:14 PM »
Ok a quick question again, how would i go about making it target a specific player. Like for example if i wanted it to only display the message to someone named Bob?