Raised This Month: $7 Target: $400
 1% 

[TF2] Feign sniper kills


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Plugin ID:
3556
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Feign sniper kills with a configurable minimum distance
    Old 03-04-2013 , 04:20   [TF2] Feign sniper kills
    Reply With Quote #1

    Feign sniper kills with a configurable minimum distance

    The kill will still show up in the kill feed, the "Critical Hit" or "Hit" particle will be displayed, but the victim will not die.

    This requires SDK Hooks.

    Use the sm_feignsniperkills_distance ConVar to configure the minimum distance between the Sniper and the victim for the plugin to kick in (i.e. for sniper kills to be feigned).

    This is intended for TF2 DM servers, and goes well with Thrawn's tHeadshotOnly plugin (it's meant to be used with it).

    Todo list (feel free to suggest improvements):
    - Play the death by crit scream sound for the Sniper.
    - Show the ragdoll with the headshot animation (if this is possible).
    Attached Files
    File Type: sp Get Plugin or Get Source (sniper.sp - 904 views - 4.6 KB)
    Seta00 is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 03-04-2013 , 15:11   Re: [TF2] Feign sniper kills
    Reply With Quote #2

    interesting idea
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 03-04-2013 , 22:02   Re: [TF2] Feign sniper kills
    Reply With Quote #3

    you could spawn a ragdoll and render invisible the player for a few seconds as well, that would be lulz.
    it's easy to do this, if you don't know how to manually create the entities, you could take a working example from here:
    http://forums.alliedmods.net/showthread.php?p=666222

    just change the ice dynamic.. I think
    some ragdoll removal mods just create a new ragdoll and kill it on the next frame if you want the thing to look proper, so this should work.
    friagram is offline
    Seta00
    The Seta00 user has crashed.
    Join Date: Jan 2010
    Location: Berlin
    Old 03-04-2013 , 23:03   Re: [TF2] Feign sniper kills
    Reply With Quote #4

    Quote:
    Originally Posted by friagram View Post
    you could spawn a ragdoll and render invisible the player for a few seconds as well, that would be lulz.
    That would disrupt the victim, which is exactly what I try to avoid in the plugin.
    Seta00 is offline
    Shadowysn
    Senior Member
    Join Date: Sep 2015
    Location: Location:
    Old 07-01-2020 , 05:40   Re: [TF2] Feign sniper kills
    Reply With Quote #5

    inb4 somewhat mad users inform me author is either long-time inactive or to quit posting on dead plugins

    Seems like a very-lightweight and specific version of the TF2 AC-DR if you ask me.
    But I didn't even realize this plugin was trying to feign a death in specific conditions until 2020, damn.

    I am dumb, simple as that.
    __________________
    ragdoll spam, that is all

    Steam profile, where I game, obviously.
    Youtube channel, where I do Stick Death Maze animations and some other stuff.
    no plugin requests, sorry


    My Plugins:
    -search list-
    Modified Plugins:
    1 | 2 | 3 | 4

    Last edited by Shadowysn; 11-13-2021 at 03:01.
    Shadowysn is offline
    Seta00
    The Seta00 user has crashed.
    Join Date: Jan 2010
    Location: Berlin
    Old 07-01-2020 , 05:58   Re: [TF2] Feign sniper kills
    Reply With Quote #6

    This is meant for DM servers where you want snipers to still be able to practice their shots and have the satisfaction of getting kills, but without making it impossible for less skilled players to play, practice, and have a good time.

    Ideally it would also make the killed player less visible only to the killer for a few seconds, and even spawn a ragdoll that is only visible to the killer, as was discussed above. But I don't know if this is possible. The idea is to provide enough of a reward for getting kills, but no disruption at all when you get (fake) killed.
    Seta00 is offline
    Shadowysn
    Senior Member
    Join Date: Sep 2015
    Location: Location:
    Old 07-01-2020 , 07:06   Re: [TF2] Feign sniper kills
    Reply With Quote #7

    Quote:
    Originally Posted by Seta00 View Post
    This is meant for DM servers where you want snipers to still be able to practice their shots and have the satisfaction of getting kills, but without making it impossible for less skilled players to play, practice, and have a good time.

    Ideally it would also make the killed player less visible only to the killer for a few seconds, and even spawn a ragdoll that is only visible to the killer, as was discussed above. But I don't know if this is possible. The idea is to provide enough of a reward for getting kills, but no disruption at all when you get (fake) killed.
    Oh wow, didn't even expect you to be online

    You should probably update the description to better reflect that you only want the ragdoll and the victim to be only visible to the killer, and in the victims case, only for a few seconds.

    EDIT: Turns out the ragdolls can't be hidden from specific clients with SetTransmit... the only other option is server-sided ragdolls, but those are network-intensive, and they appeared to always crash my game every time I tried to spawn them.

    Sourcemod seems to have a way to select what and which client should see something with SDKHooks now; SetTransmit.
    Although, it's a bit finicky, but it's included with Sourcemod so there's no need to add extra dependencies.

    I made use of this neat little thing in a modified version of an early AC-DR, just for Left 4 Dead 2.

    There needs to be some changes and calculations to get it working as its intended in your code, but you can try doing some research on SetTransmit.
    General consensus for Action Hook_SetTransmit is that:
    - return Plugin_Handled will hide the entity from the client.
    - return Plugin_Continue will not hide the entity from the client.

    Spoiler


    These are the snippets from the code, although I could feel a lot better with attaching the L4D_DeadRinger.sp file itself.

    But if you still don't know how to do it, then I could probably try and help add these features to your plugin.
    You can also do a little research onto my once-private Drop-Dead plugin to find out how to replicate the ragdoll and weapon drop without need of a signature.
    Attached Files
    File Type: sp Get Plugin or Get Source (DropDead.sp - 316 views - 16.2 KB)
    File Type: sp Get Plugin or Get Source (L4D_DeadRinger.sp - 323 views - 62.2 KB)
    __________________
    ragdoll spam, that is all

    Steam profile, where I game, obviously.
    Youtube channel, where I do Stick Death Maze animations and some other stuff.
    no plugin requests, sorry


    My Plugins:
    -search list-
    Modified Plugins:
    1 | 2 | 3 | 4

    Last edited by Shadowysn; 07-01-2020 at 10:09.
    Shadowysn is offline
    Shadowysn
    Senior Member
    Join Date: Sep 2015
    Location: Location:
    Old 07-02-2020 , 08:58   Re: [TF2] Updated feign sniper kills (WORK IN PROGRESS!!!!)
    Reply With Quote #8

    Managed to get the transmit trickery functional.

    A fake corpse + weapon will now be dropped upon a successful hit, set to be visible only to those that recently attacked them, as well as a few extra changes.
    Unfortunately, transmit trickery means that the victims become completely invisible instead of just half, and a bit of weird stuff happens.

    It'd most likely require further use of TheByKotik's SendProxy in order to make only the attacker see the victim as half-visible.

    The only other way to bypass this without dependencies on an extension, would involve making everyone's model half-visible with an appropriate alpha value and RENDERMODE, and then use seperate player models to show them, but I haven't got the time to do that now.
    Not to mention it seems very hacky.

    This functions well for a few snipers, at least.
    Attached Files
    File Type: sp Get Plugin or Get Source (feign_sniper_kills.sp - 319 views - 22.6 KB)

    Last edited by Shadowysn; 07-03-2020 at 02:56. Reason: Fixed a bug with transmit spamming errors in console
    Shadowysn is offline
    Shadowysn
    Senior Member
    Join Date: Sep 2015
    Location: Location:
    Old 10-15-2020 , 04:18   Re: [TF2] Feign sniper kills
    Reply With Quote #9

    I am now aware that all my plugins are often not optimized thanks to Silvers... :V
    In part, due to half-laziness and half-not-knowing-what-exactly-to-do.

    The transmit function may need optimizing, as do almost the entire plugin, but I'm not in the mood to do so. I was hoping you'd take it and edit, or even just reply, but seems like nothing happened.
    Shadowysn 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 02:51.


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