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

[Build Command] - Move Prop by Mouse


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Tested on HL2DM, but I don't see why it wouldn't work in other games. I don't think anyone really plays anymore, but I'll share anyway haha.

I've only ever seen "prop grab" features that would tie the props position to the players position, I've never liked this as it makes fine-tuning and precision a pain, so I decided to make my own.

By keybinding "+movexy", and while looking at a prop and holding that keybind, you will be able to maneuver the selected prop around the X and Y axis by moving your mouse around, this is done via TraceRay and Entity Teleporting on a timer that repeats every 0.1 seconds.

This is my first ever plugin, so it could definitely be better, however it works great for what I wanted it for so I decided to share it. I will however, be trying to make it more efficient and precise for learning reasons.

NOTES:
  • Try to grab the props at the lowest point nearest to you, it will make the movement a lot cleaner and precise, grabbing higher up can make the movements very un-likeable, due to the TraceRay reading farther past the prop. (Workin' on it).
  • Prop will be frozen when grabbed to prevent it from spazzing out and will remain frozen when released. (it remains frozen after release because this works best as an addon to a build mod that supports unfreezing props)
  • Does not move along the Z axis (Other build mods support this, I use SimpleBuild)
  • No admin rights are required to use, change that in the OnPluginSart() function if wanted.

Like most plugins, this is implemented simply by dropping the "moveprop_mouse.sp" file in your "scripting" folder, compiling it, and copy/pasting the "moveprop_mouse.smx" file located in the "compiled" folder, into your "plugins" folder. OR, take the .smx and drop it right into your plugins folder if you don't care for the source code

Anyway, hope someone finds this useful, and please feel free to share any tips, feedback or ways of increasing precision! it would be much appreciated.

Attached Files
File Type: sp Get Plugin or Get Source (moveprop_mouse.sp - 3.4 KB)
File Type: smx moveprop_mouse.smx (7.3 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

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

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