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 131660 times)

0 Members and 1 Guest are viewing this topic.

Offline Orbina

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Player Connect/Disconnect Message [1.11v]
« Reply #180 on: September 22, 2016, 02:47:27 AM »
Going on from the above, if you want to add custom files, never put sound files you want to use directly in the sound folder (garrysmod/sound), because chances are, something may already exist. You need to make a new sound folder in my addon (garrysmod/addons/apple_join_disconnect_warning/sound/NEWFOLDERNAME (and be creative)), and put the sound files in there. After that, in the sv_player.lua you need to put this line resource.AddFile("") under the AddCSLuaFile( "cl_player.lua"  ), and for the resource line, you need to add the directory of the new sound ( resource.AddFile("sound/NEWFOLDERNAME/soundfile.mp3") ), and then also change the surface.PlaySound("") in cl_player.lua, and that will all work.

I did everything as you wrote, but the custom files sound still does not play

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Connect/Disconnect Message [1.11v]
« Reply #181 on: September 23, 2016, 07:42:37 AM »
I did everything as you wrote, but the custom files sound still does not play

Personally, I don't like adding sounds directly to garry's mod since Source itself has a specific way it likes sounds. You need to have the sound file at a certain setting, etc.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Arcm9

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Player Connect/Disconnect Message [1.11v]
« Reply #182 on: February 09, 2018, 04:12:30 AM »
Hi, I was going to start a new topic but I figured id just ask here and hopefully get a reply faster. For this addon, is there a way I can change it so that only superadmins can see the ip's? As i think it will cause some problems.

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 [1.11v]
« Reply #183 on: February 09, 2018, 03:35:48 PM »
1) First - why? Do you not trust your admin level staff? Admin in Gmod carries lots of access. If you're worried about admins seeing IP addresses of players that, as an admin, most people expect to help maintain a server, you aren't seeing a forrest surrounding the tree you are looking at.

1) Basic Gmod lua programming - we strongly encourage people to learn it here.
Really, this one is a fun one to learn from. Learning this one Gmod lua player function check might help you fix other items you've always wanted superadmin only (but, really, seriously, think about my #1 first)
Two files. I found one line logic statement with my experienced eyes in 10 seconds.
( Hint - Where, v or other variable letter is almost always the player being checked, if v:IsAdmin() then ... )
You can have little programming knowledge at all and likely have figured out where to edit, perhaps not HOW to edit (Hint, Player:IsSuperAdmin), but definitely where to edit.
:)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming