Garry's Mod

Garry's Mod

100 ratings
SprayMesh Extended
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Fun, Realism
File Size
Posted
Updated
92.735 KB
Nov 4, 2023 @ 1:26pm
Apr 19 @ 10:38pm
8 Change Notes ( view )

Subscribe to download
SprayMesh Extended

Description
This is my modified version of the addon "SprayMesh" with various new features, bug fixes and optimizations.

If you are not familiar with SprayMesh: It is a replacement/improvement to the default Garry's Mod player sprays, allowing players to set image URLs as their spray. The sprays use map-conforming meshes to allow them to wrap around surfaces.

SprayMesh Extended is designed to be a replacement to SprayMesh--using both will cause issues!

The menu can be accessed either by typing /spraymesh, typing "spraymesh_settings" in console, or by using the Sandbox context (C) menu.

Improvements & changes:
  • A built-in menu for SprayMesh Extended:
    • Comes with a settings panel to adjust some SprayMesh Extended settings.
    • Comes with a spray manager to save, name & search sprays.
    • Has a pop-up menu to view all active sprays on the server.
    • Has a pop-up menu which contains a guide to using SprayMesh Extended, as well as viewing what spray types (like image & video extensions) are whitelisted.
  • Sprays can be rotated on floors and ceilings.
  • Sprays are now easier to see in dark areas.
  • Sprays render in the order they're sprayed (so that players can spray over each others' sprays).
  • Sprays will be kept when a player re-joins the server (however, sprays will still reset upon a server shutdown/restart).
  • A cleaner codebase, and optimized code a bit.
  • Config (and Lua hooks) for developers and server owners to customize SprayMesh Extended to their liking.
  • Support for CatBox & LitterBox natively included.
  • Removed YouTube video spray support.

The addon's source code can be found on GitHub: https://github.com/chev2/gmod-addons

For this addon to work, you most likely need to use the x86-64 beta branch of Garry's Mod, as the sprays internally use web rendering which usually work better (or possibly only work) on that beta branch.

Credits

Shoutout to SprayMesh's original author Bletotum for making such an awesome addon: https://steamcommunity.com/sharedfiles/filedetails/?id=394091909

Additionally, shoutout to Sony for making Spray Manager V2, which inspired SprayMesh Extended's own manager: https://steamcommunity.com/sharedfiles/filedetails/?id=1805554541

Configuration
For server owners & developers looking to change the configuration of SprayMesh Extended, such as the default fallback spray, spray sizes, whitelisted domains, etc. check out this Lua file:
lua/spraymesh/sh_config.lua
Ideally you shouldn't have to edit any other Lua file to edit SprayMesh's functionality--if there's something you'd like to be customizable, leave a suggestion.

Documentation
If you are a server owner/developer looking to extend SprayMesh's functionality, you can find some basic documentation on it here: https://github.com/chev2/gmod-addons/wiki/SprayMesh-Extended
Popular Discussions View All (2)
1
Jan 7 @ 6:51am
Can you do please that you can place spray on props?
Foxxie
1
Jan 12, 2024 @ 11:14am
Files?
Demoknight tf2
55 Comments
Chev  [author] 3 hours ago 
Switch to the 64-bit beta branch of Garry's Mod if you aren't already on it
frog May 23 @ 10:15am 
for me when I spray it shows black square with "Loading spray" for a millisecond, but when it disappears there's no spray, just empty surface
in both multi and singleplayer :steamsad:
Chev  [author] May 1 @ 1:55pm 
If you're adding this addon to a server via the Steam workshop, then there won't be a config in the lua/ folder. It's part of the addon .gma. What I recommend doing in that case is creating your own custom Lua file (make sure it runs on both client AND server) and set the variables that way. The documentation there is admittedly a bit confusing since I have to account for both people who add this addon to their server via Steam workshop as well as those who install the addon manually and edit the config file directly.

In the future to make this process more simple, I'm thinking of adding an admin menu for Sandbox gamemodes so that server admins/owners can change the config without having to know Lua coding.

You can find the config on the GitHub repo: https://github.com/chev2/gmod-addons/blob/main/addons/spraymesh_extended/lua/spraymesh/sh_config.lua
Dragonhunter229 Apr 29 @ 11:59pm 
I cant find the Lua config file for the life of me, its not in the lua folder for ether locale or my server.
Chev  [author] Apr 19 @ 10:40pm 
That bug should be fixed now, thanks for letting me know
NabraSaddle Apr 19 @ 2:33am 
[spraymesh_extended] addons/spraymesh_extended/lua/vgui/dsprayconfiguration.lua:477: Tried to use a NULL Panel!
1. GetChildren - [C]:-1
2. AddSpray - addons/spraymesh_extended/lua/vgui/dsprayconfiguration.lua:477
3. DoClick - addons/spraymesh_extended/lua/vgui/dsprayconfiguration.lua:221
4. unknown - lua/vgui/dlabel.lua:253
god of reailty Apr 9 @ 9:20am 
i hate necro arc
M16A1 Apr 8 @ 1:40pm 
if you have too much sprays menu crashes game during loading all images sometimes freezes whole pc is there way to more optimized image loading for menu
ph0roggy Mar 7 @ 7:58am 
is anyone else experiencing the sprays only working in singleplayer? In multiplayer the sprays are invisible for me and my friends, but in single player it works, weird. :melon:
ph0roggy Jan 20 @ 7:25am 
I love it man, keep up the good work :Dogeface: