Raised This Month: $32 Target: $400
 8% 

[Any] Admin Player/Entity Grabber - 12/29/2014


Post New Thread Reply   
 
Thread Tools Display Modes
Author
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Plugin ID:
3643
Plugin Version:
1.0.1
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    60 
    Plugin Description:
    Allows admins to grab, move, and throw players and items
    Old 05-06-2013 , 04:25   [Any] Admin Player/Entity Grabber - 12/29/2014
    Reply With Quote #1

    Allows admins to grab players. This should work in any game, though I know some game events may work differently in a few games.
    I use it for Team Fortress 2.

    I noticed that there were a lot of prop/entity grabbers, but most had a lot of bloat, or did a ton of things. This one is really simple, and only targets clients. It also drops players when the grabber dies, so they don't stay grabbed, as well as drops the grabbed player when they die. It is also fairly light weight, and only hooks/updates admins that have access to the command (using prethink). We use it mostly to move players around when they are blocking others (friendly situations), or to throw people into saw blades or other various map traps (when it suits us).

    Commands:
    • sm_grab: (ADMFLAG_SLAY) Toggles grab on a player.

    The grab has 2 modes. The default mode, will grab a player and bring them to you. The second mode uses +attack2, so if you hold your alt-fire and use the grab command, it will maintain the distance. Similarly, if you are grabbing a player, and use +attak2 while using the command, it will throw them rather than drop them.

    Code:
    2013-5-6 (v1.0.0)
    * Initial Release
    
    2013-5-6 (v1.0.1)
    * Removed round_start event
    * Fixed late load loop
    
    2014-12-29 (v1.0.2)
    * Added aim target immunity
    * Added prop/projectile grabbing
    Installation:
    • Place the admingrab.smx file in your "addons/sourcemod/plugins" directory.
    • Use override flag "admin_grab" to change access.

    Comments:
    • Some grab and throw code was taken from Entcontrol
    Attached Files
    File Type: sp Get Plugin or Get Source (admingrab.sp - 2320 views - 8.9 KB)
    File Type: smx admingrab.smx (7.4 KB, 3981 views)
    File Type: sp Get Plugin or Get Source (admingrab_1.02.sp - 2050 views - 8.7 KB)
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.

    Last edited by friagram; 12-29-2014 at 12:20.
    friagram is offline
    Zephyrus
    Cool Pig B)
    Join Date: Jun 2010
    Location: Hungary
    Old 05-06-2013 , 09:08   Re: [Any] Admin Player Grabber - 5/6/2013
    Reply With Quote #2

    i havent checked but i dont recall css/csgo having teamplay_round_start event
    __________________
    Taking private C++/PHP/SourcePawn requests, PM me.
    Zephyrus is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 05-06-2013 , 09:12   Re: [Any] Admin Player Grabber - 5/6/2013
    Reply With Quote #3

    aye it probably does not. I'll have to check and remove/fix the events that are needed. If you know of a list somewhere I'll go and put in the proper events.

    http://wiki.amxmodx.org/Counter-Strike:_Source_Events

    teamplay_round_start
    Note: -
    Name: teamplay_round_start
    Structure:
    bool full_reset
    Most possibly does not fire :/

    I should be using the sourcemod event "round_start" i believe, but it doesn't work in tf2.
    There's also dod_round_start. Does anyone know if there's a catch-all event, or which ones should be used for what mod(s)?

    It may/probably is not even needed. Player_spawn I believe will be fired by all games on round_starts, which will cause the player variable to be reinitialized.

    Edit: Updated to 1.0.1
    - Removed the round_start event, I do not think it is needed, as round restart will/should just re-initialize the clients anyways by triggering player_spawn on each one of them. Worst case scenario, the player's entity will stay grabbed by the admin that grabbed them, which would just be annoying. The player would most likely be crushed and die, and then be dropped
    - There was a missing client validation check before checking command access for prethink for lateload on inpluginstart, added that.

    =/ need more coffee.
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.

    Last edited by friagram; 05-06-2013 at 10:05.
    friagram is offline
    vexium
    Member
    Join Date: Jan 2013
    Old 05-10-2013 , 01:27   Re: [Any] Admin Player Grabber - 5/6/2013
    Reply With Quote #4

    this is very neat, though i dont get how +attack2 works. It doesn't seem to keep people at a distance when held down... so not sure about that functionality. still, very cool.
    vexium is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 05-10-2013 , 07:29   Re: [Any] Admin Player Grabber - 5/6/2013
    Reply With Quote #5

    Quote:
    Originally Posted by friagram View Post
    Comments:
    • Some grab and throw code was taken from Entcontrol
    Yeah, entcontrol have very usefull code
    __________________
    Veteran Coder -> Activity channel
    Coding on CS2 and taking paid and free jobs.

    Contact: Steam, Telegram or discord ( franug ).

    You like my work? +Rep in my steam profile comments or donate.


    Last edited by Franc1sco; 05-10-2013 at 07:36.
    Franc1sco is offline
    Send a message via MSN to Franc1sco
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 05-11-2013 , 06:56   Re: [Any] Admin Player Grabber - 5/6/2013
    Reply With Quote #6

    Quote:
    Originally Posted by vexium View Post
    this is very neat, though i dont get how +attack2 works. It doesn't seem to keep people at a distance when held down... so not sure about that functionality. still, very cool.
    Probably another oversight on my part, as some games probably don't have +attack2. Usually it's the alt-fire key. It may be better for me to use +use or +speed or something.

    Let me know what game you're using it with, and I'll have to look into supported keys.
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.
    friagram is offline
    vexium
    Member
    Join Date: Jan 2013
    Old 05-12-2013 , 23:14   Re: [Any] Admin Player Grabber - 5/6/2013
    Reply With Quote #7

    well, that's the thing. i'm using it on csgo and csgo uses +attack2, but still nothing.
    vexium is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 05-13-2013 , 00:54   Re: [Any] Admin Player Grabber - 5/6/2013
    Reply With Quote #8

    Hold +attack2 while you use the grab command to hold at distance, or while holding, hold +attack2 and the grab command to throw. It's a modifier, not a replacement for the command.
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.
    friagram is offline
    vexium
    Member
    Join Date: Jan 2013
    Old 05-13-2013 , 12:39   Re: [Any] Admin Player Grabber - 5/6/2013
    Reply With Quote #9

    at least in csgo, it is not holding them at a distance, and toggling the grab command is the only way to throw as far as i can tell

    edit: nvm, working fine, was having conflicts with another plugin set to use +attack2 is all

    Last edited by vexium; 05-15-2013 at 07:51.
    vexium is offline
    Dyl0n
    Member
    Join Date: Oct 2011
    Old 05-19-2013 , 01:19   Re: [Any] Admin Player Grabber - 5/6/2013
    Reply With Quote #10

    I'm having so much fun with this plugin. LOL. Thanks for making it
    __________________
    BABIES DONT YOU PANIC!
    If you enjoy something I did please consider donating!

    Last edited by Dyl0n; 05-19-2013 at 01:31.
    Dyl0n is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 21:48.


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