AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Resizable Sprays (v3.4.0, 2022/10/16) (https://forums.alliedmods.net/showthread.php?t=332418)

Sappykun 05-11-2021 14:20

[ANY] Resizable Sprays (v3.4.0, 2022/10/16)
 
2 Attachment(s)
Resizable (and spammable) Sprays

https://files.catbox.moe/hrd4r7.jpg

(art by i-junnosuke)

This plugin allows you to place your spray as many times as you want and as large as you want.
This is accomplished by writing a VMT file using the player's spray as a base texture, sending
the VMT file to all connected clients, precaching the material, then placing the decal in the world.

FEATURES
  • Place multiple sprays similar to Goldsrc
  • Place sprays on brush entities similar to Goldsrc
  • Dynamic resizing of player sprays

DEPENDENCIES
  • LINUX ONLY (for the time being)
  • My LateDL fork (builds available here)
    • Builds available for TF2, L4D1/2, CS:S, HL2DM, and Source 2013
  • sv_allowdownload and sv_allowupload must be enabled on your server. This is not the same as having a fastdl server!

COMMANDS

PHP Code:

// Places a "world" decal. This is the default (and safer) option. These decals are controlled
// by the client's r_decals cvar.  Placing too many of these will remove the oldest one.
sm_spray [desired scale]

// Places a "BSP" decal. These are "permanent" decals and won't decay.
// May cause issues if they are spammed on a single surface.  If the
// player using this command does not have rspr_adminoverride access,
// using this command will be equivalent to sm_spray.
sm_bspray [desired scale]

// Debug command, will display who is downloading your spray and which sprays 
// you are downloading.
// Meant to be user-facing. Only admins can see status of other users, normal 
// players will only be able to run the command on themselves.
sm_sprayinfo [user

CVARS

PHP Code:

// Spray frequency for non-admins. 0 is no delay.
// -
// Default: "0.5"
// Minimum: "0.000000"
rspr_decalfrequency "0.5"

// Enables the plugin.
// -
// Default: "1.0"
// Minimum: "0.000000"
// Maximum: "1.000000"
rspr_enabled "1.0"

// Max range for placing decals. 0 is infinite range
// -
// Default: "128.0"
// Minimum: "0.000000"
rspr_maxspraydistance "128.0"

// Maximum scale for sprays for regular players.
// -
// Default: "2.0"
// Minimum: "0.000000"
rspr_maxsprayscale "2.0"

// Maximum scale for all sprays.
// -
// Default: "32.0"
// Minimum: "0.000000"
rspr_maxsprayscale_absolute "32.0"

// Max time to wait for clients to download spray files. 0 to wait forever.
// -
// Default: "10.0"
// Minimum: "0.000000"
rspr_spraytimeout "10.0"

// Logging level. Higher number = more console spam.
// -
// Default: "2.0"
rspr_loglevel "2" 

TODO
  • General code optimization and cleanup

CHANGELOG
Spoiler


Gitlab repo (work is currently in the dev branch)

Special thanks to Bakugo for putting up with all the stupid questions I asked helping me with this project.

This plugin won't compile on the forum due to the aforementioned dependency.

Sappykun 05-11-2021 14:29

Re: [ANY] Resizable Sprays
 
Reserved. V2 is still available on the git repo if you really want it.

Cruze 05-11-2021 14:36

Re: [ANY] Resizable Sprays
 
Seems promising! Good job man! :bacon!:

Silvers 05-11-2021 16:50

Re: [ANY] Resizable Sprays
 
This is amazing! Good job! :)

Sreaper 05-11-2021 21:29

Re: [ANY] Resizable Sprays
 
Sappykun, the FileNetMessages link you have leads to a trashed thread.

Sappykun 05-11-2021 21:42

Re: [ANY] Resizable Sprays
 
Quote:

Originally Posted by Sreaper (Post 2746580)
Sappykun, the FileNetMessages link you have leads to a trashed thread.

Fixed, the link lost a 9 somewhere.

Sreaper 05-12-2021 01:52

Re: [ANY] Resizable Sprays
 
The plugin doesn't seem to work for me on TF2. No loading issues or errors generated. All it does is generate a missing decal dot regardless of the admin spraying or the flags defined in the convar. I also attempted to rejoin the server afterwards, as well as a server map change. There are also no duplicate command entries for sm_spray or sm_bspray. I am running super spray handler but that doesn't use those command names. Edit: Attempted to remove ssh just now, didn't fix. sv_download is also set to 1.

https://i.imgur.com/9IG5Rc0.png

I have filenetmessages.ext.2.tf2.so loaded.

Sourcemod version: 1.10.0.6502
Metamod:Source version: 1.12.0-dev+1147

Sappykun 05-12-2021 02:20

Re: [ANY] Resizable Sprays
 
Quote:

Originally Posted by Sreaper (Post 2746592)
The plugin doesn't seem to work for me on TF2. No loading issues or errors generated. All it does is generate a missing decal dot regardless of the admin spraying or the flags defined in the convar. I also attempted to rejoin the server afterwards, as well as a server map change. There are also no duplicate command entries for sm_spray or sm_bspray. I am running super spray handler but that doesn't use those command names. Edit: Attempted to remove ssh just now, didn't fix. sv_download is also set to 1.

https://i.imgur.com/9IG5Rc0.png

I have filenetmessages.ext.2.tf2.so loaded.

Sourcemod version: 1.10.0.6502
Metamod:Source version: 1.12.0-dev+1147

You need to create a folder called customsprays in your server's install directory. I forgot to mention it in the OP, my bad.
I'll add it to the list of things to fix for 1.1.0.

Sreaper 05-12-2021 03:34

Re: [ANY] Resizable Sprays
 
Quote:

Originally Posted by Sappykun (Post 2746594)
You need to create a folder called customsprays in your server's install directory. I forgot to mention it in the OP, my bad.
I'll add it to the list of things to fix for 1.1.0.

Worked after adding tf/materials/customspray. Thank you.

Will there be support for spraying other people's sprays?

Sappykun 05-12-2021 20:28

Re: [ANY] Resizable Sprays
 
Changelog for version 1.1.0:

- Replace world decals with regular (entity) decals. Regular decals can be sprayed on brush entities while also being controlled by r_decals.
- Allow admins to spray other client's sprays by entering a single target name as an optional second argument to sm_spray or sm_bspray.
- Auto-create required directory for plugin to function


All times are GMT -4. The time now is 23:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.