Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSS[ANY] Resizable Sprays


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Resizable (and spammable) Sprays

68747470733a2f2f66696c65732e636174626f78

(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

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


Gitlab repo

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

Attached Files
File Type: sp Get Plugin or Get Source (resizablesprays.sp - 10.4 KB)
File Type: smx resizablesprays.smx (8.2 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...