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

[TF2] Special Ragdolls (v1.0.1, 12-11-2022)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Nanochip
Senior Member
Join Date: Jan 2014
Plugin ID:
6398
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    When you kill someone, turn their ragdoll into something special.
    Old 01-10-2019 , 00:19   [TF2] Special Ragdolls (v1.0.1, 12-11-2022)
    Reply With Quote #1

    [TF2] Special Ragdolls



    Description:
    This is a cosmetic plugin intended for server donors. It allows players to change their enemies' ragdolls into something such as solid gold, ice, electrocuted, etc when the enemy is killed.

    Video Demonstration:


    Command:
    • sm_ragdoll - (Default Access: ADMFLAG_RESERVATION) Opens the Ragdoll menu.

    Installation:
    1. Install Sourcemod.
    2. Click "Get Plugin" at the bottom of this post.
    3. Place it in your addons/sourcemod/plugins/ folder.
    4. Restart the server or type "sm plugins load specialragdolls" in the server console.

    Changelog:
    Spoiler
    Attached Files
    File Type: sp Get Plugin or Get Source (specialragdolls.sp - 405 views - 7.4 KB)
    __________________

    Last edited by Nanochip; 12-11-2022 at 21:55. Reason: Updated to v1.0.1, bug fix.
    Nanochip is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 01-10-2019 , 10:17   Re: [TF2] Special Ragdolls (v1.0, 1-9-2019)
    Reply With Quote #2

    Cool, but did you really have to use a switch just to disable the selection? Also a warning to anyone who use this, this uses tf_ragdoll entities, meaning it can lag the crap out of your server if everyone gets slain all at once.
    Mitchell is offline
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 01-10-2019 , 16:17   Re: [TF2] Special Ragdolls (v1.0, 1-9-2019)
    Reply With Quote #3

    Posted this in the SM Discord but I'll post here too;

    1. Might want to toss #pragma newdecls required in there and recompile to see if you've forgotten anything. For example, I noticed a missing return type for OnClientCookiesCached.
    2. That menu switch setup, yikes. Why not utilize your existing ragdollType[client] variable to determine which menu item to set to ITEMDRAW_DISABLED. Something like this quick and dirty thing I threw together:

    Lots of ternaries but it should do the job
    404UserNotFound is offline
    Nanochip
    Senior Member
    Join Date: Jan 2014
    Old 01-10-2019 , 16:44   Re: [TF2] Special Ragdolls (v1.0, 1-9-2019)
    Reply With Quote #4

    Quote:
    Originally Posted by Mitchell View Post
    Cool, but did you really have to use a switch just to disable the selection? Also a warning to anyone who use this, this uses tf_ragdoll entities, meaning it can lag the crap out of your server if everyone gets slain all at once.
    That's assuming if everyone has access to sm_ragdoll in the first place, otherwise it's intended for admins/vips which is usually only a couple of players. Also, to help mitigate the lag, the ragdoll entity is killed after 20 seconds instead of the default despawn time.

    Quote:
    Originally Posted by 404UNF View Post
    Posted this in the SM Discord but I'll post here too;

    1. Might want to toss #pragma newdecls required in there and recompile to see if you've forgotten anything. For example, I noticed a missing return type for OnClientCookiesCached.
    2. That menu switch setup, yikes. Why not utilize your existing ragdollType[client] variable to determine which menu item to set to ITEMDRAW_DISABLED. Something like this quick and dirty thing I threw together:

    Lots of ternaries but it should do the job
    Thanks for the tips.
    I had made this plugin a couple years ago back when SM 1.7 came out, there use to be a compile error with OnClientCookiesCached in regards to the return type.
    __________________
    Nanochip is offline
    cheeto1
    Junior Member
    Join Date: May 2016
    Old 02-04-2019 , 20:15   Re: [TF2] Special Ragdolls (v1.0, 1-9-2019)
    Reply With Quote #5

    I was going to have my modder make me a plugin exactly like this but you beat him to it lol this is exactly what I wanted and works great so far
    cheeto1 is offline
    Dynamilk
    New Member
    Join Date: Dec 2022
    Old 12-04-2022 , 21:04   Re: [TF2] Special Ragdolls (v1.0, 1-9-2019)
    Reply With Quote #6

    Not working after the 12/1/22 update.

    m_iPlayerIndex property has been replaced with m_hPlayer. Not sure of a workaround for it.

    Last edited by Dynamilk; 12-04-2022 at 21:08.
    Dynamilk is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 12-05-2022 , 01:57   Re: [TF2] Special Ragdolls (v1.0, 1-9-2019)
    Reply With Quote #7

    Plugin will likely be updated by the author soon. In the meantime you can get it working by changing this at line 243:

    PHP Code:
    Change from this:  SetEntProp(ragdollProp_Send"m_iPlayerIndex"client);

    to thisSetEntPropEnt(ragdollProp_Send"m_hPlayer"client); 

    Last edited by PC Gamer; 12-05-2022 at 01:58.
    PC Gamer is offline
    Dynamilk
    New Member
    Join Date: Dec 2022
    Old 12-05-2022 , 10:30   Re: [TF2] Special Ragdolls (v1.0, 1-9-2019)
    Reply With Quote #8

    Quote:
    Originally Posted by PC Gamer View Post
    Plugin will likely be updated by the author soon. In the meantime you can get it working by changing this at line 243:

    PHP Code:
    Change from this:  SetEntProp(ragdollProp_Send"m_iPlayerIndex"client);

    to thisSetEntPropEnt(ragdollProp_Send"m_hPlayer"client); 
    cheers mate!
    Dynamilk is offline
    gdfsgdfg
    Junior Member
    Join Date: Jun 2013
    Old 12-07-2022 , 16:26   Re: [TF2] Special Ragdolls (v1.0, 1-9-2019)
    Reply With Quote #9

    Quote:
    Originally Posted by PC Gamer View Post
    Plugin will likely be updated by the author soon. In the meantime you can get it working by changing this at line 243:
    Doesn't work for me, then again I'm getting some compile warnings.

    Edit:

    Could you upload your smx?

    Last edited by gdfsgdfg; 12-10-2022 at 13:36.
    gdfsgdfg is offline
    Nanochip
    Senior Member
    Join Date: Jan 2014
    Old 12-11-2022 , 16:50   Re: [TF2] Special Ragdolls (v1.0.1, 12-11-2022)
    Reply With Quote #10

    Updated and fixed. Download from OP.
    __________________
    Nanochip is offline
    Reply


    Thread Tools
    Display Modes

    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 14:34.


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