SprayMesh - A better, safer replacement for gmod sprays! Also: Youtube support
84 replies, posted
What sites are you planning to add support for? I can add more support to my command in advance :)
Currently none. I think imgur and gfycat cover it.
Here's a tip to those people that were renaming gif to png and such: if you rename it to webm on imgur, imgur will actually generate a webm for it. I'd do this in a browser first, and then in gmod once the file has finished being created on imgur's side.
Gfycat does it at a better quality though, so my addon tells people to use it instead.
[QUOTE=bitches;47193161]Currently none. I think imgur and gfycat cover it.
Here's a tip to those people that were renaming gif to png and such: if you rename it to webm on imgur, imgur will actually generate a webm for it. I'd do this in a browser first, and then in gmod once the file has finished being created on imgur's side.
Gfycat does it at a better quality though, so my addon tells people to use it instead.[/QUOTE]
I might add something to the script that detects whether the link ends in .gif and then sticks the ID from the gif into a webm link. Going to be hard to do if the externsion has ?1 after it or just isn't specified. Also, I tried to set a gfy webm and it came up with the 'an error occurred' YouTube page. Any idea why? Also is a gifv okay to have as a spray?
Gifv is okay, as noted in the instructions/OP. It's actually just imgur's dumb container that loads a .webm file. Imgur had this big dramatic announcement pretending to have invented the webm. I loathe them for it.
Renaming gif automatically could be bad because it can take awhile for imgur to create the webm, and the link could end up not working properly until the next map/rejoining. Even when people rename the gif to jpg/png/bmp, and the spray displays a notice saying they can't do that, I tell them to use gfycat. It's just better.
What is the link you used to the webm?
[QUOTE=bitches;47193352]Gifv is okay, as noted in the instructions/OP. It's actually just imgur's dumb container that loads a .webm file. Imgur had this big dramatic announcement pretending to have invented the webm. I loathe them for it.
Renaming gif automatically could be bad because it can take awhile for imgur to create the webm, and the link could end up not working properly until the next map/rejoining. Even when people rename the gif to jpg/png/bmp, and the spray displays a notice saying they can't do that, I tell them to use gfycat. It's just better.
What is the link you used to the webm?[/QUOTE]
[url]https://zippy.gfycat.com/WeakNaughtyBrahmancow.webm[/url]
zippy.gfycat.com/WeakNaughtyBrahmancow.webm
[url]https://gfycat.com/WeakNaughtyBrahmancow[/url]
gfycat.com/WeakNaughtyBrahmancow
All of these links worked in singleplayer using my command, it just didn't work in multiplayer.
I even tried zippy.gfycat.com/WeakNaughtyBrahmancow.webm manually through the console and it didn't seem to work.
Also, when I renamed a imgur gif to a webm, it just turned it into a gifv.
I just told you that gifv = webm.
[editline]22nd February 2015[/editline]
You need to make sure that your server is updated to the current version. Try removing the addon entirely and then adding it back.
[QUOTE]just using the PlayerSprayMesh hook instead of PlayerSpray[/QUOTE]
Thanks I'll do that now! :smile:
The command now allows gifs to work by turning them straight into gifv links. Seems to respond fairly normally as far as I have seen :) Also, it may be worth noting that it seemed to show imgur gifvs and webms as black boxes. And finally, is there was to say 'if img = banned then' or 'if img = gif then' to detect if it is a gif?
[QUOTE=Baron von Hax;47197375]The command now allows gifs to work by turning them straight into gifv links. Seems to respond fairly normally as far as I have seen :) Also, it may be worth noting that it seemed to show imgur gifvs and webms as black boxes. And finally, is there was to say 'if img = banned then' or 'if img = gif then' to detect if it is a gif?[/QUOTE]
I don't know what you're talking about at the end. I already detect gifs and renamed gifs. If you're making a chat command you don't need to worry about that.
The black box is not what I would call responding "fairly normally". That's what I warned you to not do.
[QUOTE=bitches;47198743]I don't know what you're talking about at the end. I already detect gifs and renamed gifs. If you're making a chat command you don't need to worry about that.
The black box is not what I would call responding "fairly normally". That's what I warned you to not do.[/QUOTE]
What I wanted to do was recognise if the image was a gif and then take the image ID and put it into a gifv link, not block gifs :P Also, I've got webms to appear but the gifvs just don't seem to be working (I mean not working with SprayMesh when using 'SprayMesh_URL i.imgur.com/y11rRMF.gifv'). I'm not sure if this is what you meant by responding fairly normally or not so I thought I'd just go ahead and say it anyway :D
Hi is there a possibility to remove the function to spray in spectator deathmatch? I know you need the IsGhost() request but I don't know where I have to put it exactly
Subscribe your server to the workshop version, and put this code in a new file lua/autorun/server/noghostspray.lua
[lua]
hook.Add("PlayerSprayMesh","NoGhostSpray",function(ply)
if ply:IsGhost() then return true end
end)
[/lua]
Assuming that ply.IsGhost is the correct function to detect spectators in your gamemode.
Some players seem to be getting this error: [url]http://prntscr.com/6e8wwv[/url]
That's really confusing, because line 538 is "coord.color = Color(lcol.x+basec,lcol.y+basec,lcol.z+basec,255)"
Regardless, I've added a whole bunch of checks to prevent that error. If they continue to get that error, it means their version is outdated.
[editline]8th March 2015[/editline]
just fixed a thing i broke in that update a few seconds ago
[editline]8th March 2015[/editline]
ditto
It's really frustrating when you are having the same issue someone else is having and they are going back and forth trying to solve it and finally they come back with...
[QUOTE=zeaga;47156450]
I've got it all fixed now, thanks.[/QUOTE]
What did you do to fix it?! My son and I are having the same issues on our online multiplayer server. Spray 'g' doesn't do anything.
When we put SprayMesh on our local singleplayer it works, but it will only spray the cat image even after trying various other URL images that are not .gif and are small in size.
[B]EDIT: [/B]Didn't quite catch that the image HAS to be from an imgur URL... used one from there and it now works properly on the local single player.
...and I have informed my son what the ID ten 't' error is: ID10T
He did not add the spraymesh addon to our live server.
glad to hear it works fine
anyone in the future should add me on steam for questions about this, because i won't be keeping up with this thread much
i'll ignore anyone that is incompetent; try adding it the same way you would any other addon, on a default no-addons server and see if that works, before complaining
increased spray size
you seriously deleted me because you refuse to accept people want to customize mods for their own server?
pretty pathetic.. also be more friendly to people, might earn you some respect.
[QUOTE=debby saurus;47677369]you seriously deleted me because you refuse to accept people want to customize mods for their own server?
pretty pathetic.. also be more friendly to people, might earn you some respect.[/QUOTE]
what even
you added me to say that my sprays are too small, so i did an update just for you to increase spray size
i don't mean to keep you around forever as my bestest friend on steam
don't be so rude
[editline]7th May 2015[/editline]
i even explicitly told you how to modify the script yourself, before you mentioned you were already doing that
you can't be a gmod developer and not like mod customization
stop feeling so entitled like i've besmirched your honour by being done with you
[QUOTE=bitches;47677378]what even
you added me to say that my sprays are too small, so i did an update just for you to increase spray size
i don't mean to keep you around forever as my bestest friend on steam
don't be so rude[/QUOTE]
it wasn't about that u did the update or not, it's about you refusing to tell what line to edit myself.
not willing to accept the fact most people use GMAD to extract your mod and customize it to their own liking....
but no worries already figured it out. thnx anyway
Stupid question inbound: Would changing the extension of an imgur image to .gifv have more 'strain' on the server than using a normal image extension? I'm assuming it wouldn't but I thought I'd be better off asking :)
The server itself is not strained by any of this. Client FPS is what's to worry about.
Gifv is imgur's stupid renaming of webm, as a marketing ploy to pretend they invented webm.
Animated sprays (webm/gifv) are more straining than regular static sprays, which is why they are turned off by default for all users, who can individually turn them on.
[QUOTE=bitches;47686400]The server itself is not strained by any of this. Client FPS is what's to worry about.
Gifv is imgur's stupid renaming of webm, as a marketing ploy to pretend they invented webm.
Animated sprays (webm/gifv) are more straining than regular static sprays, which is why they are turned off by default for all users, who can individually turn them on.[/QUOTE]
Would the clients FPS be strained if the spray was just a static .jpg spray with the .gifv extension on the end instead of the .jpg?
The main reason I'm asking is because the image extension can't be identified from just [url]http://imgur.com/gallery/4knjgES[/url] so I wanted to play it safe by making every image .gifv in my spraymesh command so that gifs/gifv/webm would be shown as well as images instead of using the extension .jpg and having only images shown when [url]http://imgur.com/gallery/4knjgES[/url] is put in as the spray link. (The image ID is taken from the link and inserted into a new link such as [url]http://i.imgur.com/4knjgES.jpg[/url])
If you change all links to gifv they'll break because the different file types embed differently.
New version of ULX SprayMesh released!
[B]DOWNLOAD: [url]https://garrysmods.org/download/24402/ulx-spraymesh[/url][/B]
[IMG]https://s3-eu-west-1.amazonaws.com/garrysmod-org/24402/2/1024x768.jpg[/IMG]
Just to note, I am in no way interested in fitness or health.
Sorry, you need to Log In to post a reply to this thread.