AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Grabber:SM (https://forums.alliedmods.net/showthread.php?t=73300)

L. Duke 06-26-2008 12:20

Grabber:SM
 
3 Attachment(s)
Grabber:SM
a SourceMod version of Grabber
version 1.0.0.3

I've already added team restrictions since i know that would be the first request.

[IMG]http://img158.**************/img158/857/zgrabberpa6.th.jpg[/IMG]

How to Use

Users should bind a key to "+grab" and "+throw" to use.

For example, type this in console:
bind "mouse4" "+grab"
bind "mouse5" "+throw"

Convars
Quote:

sm_grabber_version
- version

sm_grabber_speed
- multiplier for how fast the object moves (default 10.0)

sm_grabber_distance
- how far away from the player the object stops (default 64.0)
(too small a value prevents the user from moving forward
when holding multiplayer props used in CSS)

sm_grabber_team_restrict
- 0=all teams can use, 2 or 3 to restrict that team (default 0)

sm_grabber_sound
- sound when item is held (use a looping sound)
(default "weapons/physcannon/hold_loop.wav")

sm_grabber_groundmode
- ground mode (soccer) 0=off 1=on (default 0)

sm_grabber_throwtime

- time to charge to full throw speed (default 2.0)

sm_grabber_throwspeed
- how fast to throw the object with +throw command (default 1000.0)

sm_grabber_maxdistance
- maximum distance from which a player can pickup an object (default 512.0)

sm_grabber_steal

- allow players to steal objects held by others, 0=no 1=yes (default 1)
Changelog:
1.0.0.3
- added "drop on jump" convar
1.0.0.2
- fixed bug that didn't reset object when player disconnected
- changed so +grab key press picks up and next key press drops (no longer required to hold key down) to work better with +throw command
- added throw/kick command with convars for max speed and time to charge
- added convar for max distance grabber will pick up items from
- added convar to allow/block stealing objects held by others
- added "ground" mode for soccer style play (object stays on ground and no sound is played)
1.0.0.1
- initial beta release

To Do:
- admin flag convar

Download

Naris TF2 changes (pickup sentry's, teleporters, dispensers, etc.):
TF2 edition


strontiumdog 06-26-2008 12:30

Re: Grabber:SM
 
Good job!

On the one I did for EventScripts last summer, I attached the prop to the player with SetParentAttachmentMaintainOffset.But I like the timer/teleport idea better. It stays in front of the player whereas the attachment method may look good from the players point of view, but to other players it looks like a chest of drawers or whatever is following them!

ottobohn 06-26-2008 12:45

Re: Grabber:SM
 
Think we can use this for a soccer mod? Can another play knock it out of your grip and can u throw it when released?

otto

L. Duke 06-26-2008 12:47

Re: Grabber:SM
 
Quote:

Originally Posted by ottobohn (Post 644122)
Think we can use this for a soccer mod? Can another play knock it out of your grip and can u throw it when released?

otto

That's a good point about other players using the same item. I may need to add some code. Right now I think that the player with the highest entity index will be the one to have control if both people lock on.

I also probably need to add a "maximum distance from player" convar so you can't pick up stuff from miles away. A "throw" command would be nice also.

For a soccer mod, you'd probably want to change the position calculation to use the player's absolute origin instead of the eyeangles and implement a very short maximum distance to grab from.

ottobohn 06-26-2008 13:44

Re: Grabber:SM
 
The whole soccer would be terribly greatful if you made a plugin like this. Ever play soccer jams for 1.6? This would get us one step closer to that. Right now, folks use their knife to kick the ball into a goal with no passing or limited control. Your plugin would allow folks to pass a ball, kick it.

otto

Ravager01 06-26-2008 15:21

Re: Grabber:SM
 
How about making this admin flag (ex: z (root)) only through an extra cvar?

NedStar 06-26-2008 17:45

Re: Grabber:SM
 
Awesome, works like a charm.

Box Cutter 06-26-2008 18:04

Re: Grabber:SM
 
Works good. To bad there is nothing to use this on in my icerworld server = (

-BC

L. Duke 06-28-2008 15:57

Re: Grabber:SM
 
version 1.0.0.2 uploaded with fixes and new features:
Quote:

- fixed bug that didn't reset object when player disconnected
- changed so +grab key press picks up and next key press drops (no longer required to hold key down) to work better with +throw command
- added throw/kick command with convars for max speed and time to charge
- added convar for max distance grabber will pick up items from
- added convar to allow/block stealing objects held by others
- added "ground" mode for soccer style play (object stays on ground and no sound is played)

Ravager01 06-28-2008 17:36

Re: Grabber:SM
 
If it isn't already usable by spectators, can that be made possible?


All times are GMT -4. The time now is 17:32.

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