Poll

Was any of these somewhat interesting or "cool"?

Yes, thank you :)
256 (97%)
No, do better next time :(
8 (3%)

Total Members Voted: 263

Author Topic: Player Connect/Disconnect Message [1.11v]  (Read 75245 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: 854
  • Karma: 402
  • 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.
In most cases I do not make addons for people. You may ask, and I may or may not accept, paying me will not change the answer if it was no. Feel free to try.
4-8-15-16-23-42


My Created Addons:
> Player Connect/Disconnect Message < ---- > URL Playsound Addon < ---------- > Leaderboards Records < ----------------
> Player Chat Tags < ----------------------------- > Last Joined Checker < ------------- > Workshop Dupes Permissions < ------
> Utime Hour Changer Addon < ---------------- > Autopromote XGUI Version < ---- > UtimeMOO Server/Global Edition < --
> Give Weapon Addon < ------------------------- > Player Force Spawn < ------------- >
> Set Modelany Addon < ------------------------- > Set Spawn Points < ---------------- >
> Apple H.U.D. < ----------------------------------- > Advanced Anti Noclip Killing < -- >

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: 7885
  • Karma: 372
  • 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.
:)
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin