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

[ANY] Grab Entity Command - [Oct 14, 2019]


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Description:
The sole function of this simple plugin is the ability to grab and move entities (not just props) freely with your mouse on all axis (rather than the common method of parenting to the player). I made this a while ago, but I'm sharing in case anyone has any use for it. This is very useful if you're using my TrackTrains plugin.

Demo Video on CS:S


General Notes:
  • There may be a plugin(s) with this exact functionality already? I'm not actually sure. If so, I'll be glad to remove.
  • This should work on any game, I don't see why it would not, please let me know if not.
  • The admin flag for use is set to ADMFLAG_CHEATS
  • This should work on most entities, not just props.
  • I did not implement a way to unfreeze the entity, I can figure something out if that’s an issue.

Use Notes:
  • This works best if you bind +grabent to a key, otherwise you will have to manually do -grabent to release.
  • While grabbed, your primary attack (Mouse1) will PUSH the entity farther away when pressed/held.
  • While grabbed, your secondary attack (Mouse2) will PULL the entity closer to you when pressed/held.
  • Push/Pull is supposed to block the players weapon from firing when doing so, however sometimes a bullet slips through or your secondary will execute once.
  • The farther away the entity you're grabbing is from you, the faster it will be pushed/pulled.
  • The closer the entity you're grabbing is to you, the slower it will be pushed/pulled.
  • The entity you grab will be frozen when grabbed, and remain frozen when released

Commands:
Code:

  • +grabent
          > Grab the entity you're looking at.
          > While grabbed, mouse1 to push, mouse2 to pull.
          > This will freeze (disable motion) the entity.

  • -grabent
          > Release the entity you're grabbing.
          > This is irrelevant if you bind +grabent to a key.


Installation:
  • Put the GrabEnt.smx in your servers plugins folder: SERVER/GAME/addons/sourcemod/plugins/
  • Put the GrabEnt.sp in your servers scripting folder: SERVER/GAME/addons/sourcemod/scripting/

Todo:
  • I'm open to suggestions.

CHANGELOG:
Spoiler

Attached Files
File Type: smx GrabEnt.smx (9.9 KB)
File Type: sp Get Plugin or Get Source (GrabEnt.sp - 7.2 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

×
×
  • Dodaj nową pozycję...