RSSy MYGO.pl Opublikowano Maj 11, 2021 o 18:20 RSSy Udostępnij Opublikowano Maj 11, 2021 o 18:20 Resizable (and spammable) Sprays (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 FileNetMessages (Send / Request Files from clients) sv_allowdownload 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. World sprays can // only be placed on worldspawn (non-entity) brushes, and is 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 can be placed on any valid brush entity and do // not decay. May cause issues if they are spammed on a single surface. If the // player using this command does not have the flags defined by rspr_adminflags, // using this command will be equivalent to sm_spray. sm_bspray [desired scale] CVARS PHP Code: // Version number. Don't touch. rspr_version "x.y.z" // Admin flags required to bypass restrictions and use BSP decals. // - // Default: "b" rspr_adminflags "b" // Spray frequency for non-admins, in seconds. 0 is no delay. // May cause lag if set too low, so be careful with this. // - // Default: "0.5" // Minimum: "0.000000" rspr_decalfrequency "0.5" // Controls delay between entering the command and placing the decal. // Setting this too low may cause sprays to render incorrectly on clients. // 0.5 works well enough to send the files to all clients on a 33 player server, but YMMV. // - // Default: "0.5" // Minimum: "0.000000" rspr_delay "0.5" // How close a non-admin needs to be to a surface to spray // in Hammer units. 0 is infinite range. // - // Default: "128" // Minimum: "0.000000" rspr_maxspraydistance "128" // Maximum scale for sprays for non-admins. Actual size depends on dimensions // of your spray. For reference, a 512x512 spray at 0.25 scale will be 128x128 // hammer units tall, double that of a normal 64x64 spray. // - // Default: "0.20" // Minimum: "0.000000" rspr_maxsprayscale "0.20" TODO Find a more reliable way of ensuring players have actually downloaded the proper VMT file Find a way to keep track of and remove decals Implement a spray limit per map, ideally using a queue system to remove the oldest placed spray with the newest one Potentially replace FileNetMessages with Late Downloads since it is apparently able to tell when a client has downloaded a file. Just need to figure out how to compile it for non-CS:GO engines. General code optimization and cleanup CHANGELOG Spoiler Version 1.0.0 - Initial release Gitlab repo This plugin won't compile on the forum due to the aforementioned dependency. Attached Files Get Plugin or Get Source (resizablesprays.sp - 10.4 KB) resizablesprays.smx (8.2 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi