Raised This Month: $51 Target: $400
 12% 

[TF2] Neck Crack (Dangerous Neck Snap taunt)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mr_panica
Senior Member
Join Date: Jan 2017
Location: Russia, Saint-Petersburg
Plugin ID:
8565
Plugin Version:
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 10-10-2023 , 14:08   [TF2] Neck Crack (Dangerous Neck Snap taunt)
    Reply With Quote #1

    Allows the new taunt Neck Snap to damage players.



    Convar: "sm_nk_friendlyfire_damage", "1", "Neck crack damage for teammates
    Allows you to toggle the ability to deal damage to allies. (If friendly fire is enabled)
    Attached Files
    File Type: sp Get Plugin or Get Source (neckcrack.sp - 126 views - 2.8 KB)
    __________________
    Sorry for my English.

    Last edited by Mr_panica; 10-10-2023 at 19:58.
    Mr_panica is offline
    RaphtaliaTheTanooki
    Member
    Join Date: Jul 2020
    Location: Brazil, Bahia
    Old 10-10-2023 , 16:30   Re: [TF2] Neck Crack (Dangerous Neck Snap taunt)
    Reply With Quote #2

    is this intentional?

    (checking the owner twice)

    HTML Code:
    	if(!IsClientValid(owner) || !IsClientValid(owner))
    		return Plugin_Stop;
    
    	if(!IsPlayerAlive(owner) || !IsPlayerAlive(owner))
    		return Plugin_Stop;
    __________________
    Discord: eridreemurr
    Github: https://github.com/StShAzzy/
    RaphtaliaTheTanooki is offline
    Mr_panica
    Senior Member
    Join Date: Jan 2017
    Location: Russia, Saint-Petersburg
    Old 10-10-2023 , 18:03   Re: [TF2] Neck Crack (Dangerous Neck Snap taunt)
    Reply With Quote #3

    Quote:
    Originally Posted by RaphtaliaTheTanooki View Post
    is this intentional?

    (checking the owner twice)

    HTML Code:
    	if(!IsClientValid(owner) || !IsClientValid(owner))
    		return Plugin_Stop;
    
    	if(!IsPlayerAlive(owner) || !IsPlayerAlive(owner))
    		return Plugin_Stop;
    Yes, I noticed this and have already reloaded the plugin.
    __________________
    Sorry for my English.
    Mr_panica is offline
    RaphtaliaTheTanooki
    Member
    Join Date: Jul 2020
    Location: Brazil, Bahia
    Old 10-10-2023 , 18:31   Re: [TF2] Neck Crack (Dangerous Neck Snap taunt)
    Reply With Quote #4

    so testing some modifications i made to it, would you like to take a look into it? or might as well add it to the post original post maybe
    __________________
    Discord: eridreemurr
    Github: https://github.com/StShAzzy/
    RaphtaliaTheTanooki is offline
    Mr_panica
    Senior Member
    Join Date: Jan 2017
    Location: Russia, Saint-Petersburg
    Old 10-10-2023 , 18:33   Re: [TF2] Neck Crack (Dangerous Neck Snap taunt)
    Reply With Quote #5

    Quote:
    Originally Posted by RaphtaliaTheTanooki View Post
    so testing some modifications i made to it, would you like to take a look into it? or might as well add it to the post original post maybe
    __________________
    Sorry for my English.
    Mr_panica is offline
    RaphtaliaTheTanooki
    Member
    Join Date: Jul 2020
    Location: Brazil, Bahia
    Old 10-10-2023 , 18:37   Re: [TF2] Neck Crack (Dangerous Neck Snap taunt)
    Reply With Quote #6

    huh, i just noticed for some reason my OwnerIndex keeps returning 175 (just for me) for the other players it returns 150
    __________________
    Discord: eridreemurr
    Github: https://github.com/StShAzzy/
    RaphtaliaTheTanooki is offline
    RaphtaliaTheTanooki
    Member
    Join Date: Jul 2020
    Location: Brazil, Bahia
    Old 10-10-2023 , 18:39   Re: [TF2] Neck Crack (Dangerous Neck Snap taunt)
    Reply With Quote #7

    it seems some items can change the m_nSequence ID and this makes the check fail
    __________________
    Discord: eridreemurr
    Github: https://github.com/StShAzzy/
    RaphtaliaTheTanooki is offline
    RaphtaliaTheTanooki
    Member
    Join Date: Jul 2020
    Location: Brazil, Bahia
    Old 10-10-2023 , 18:56   Re: [TF2] Neck Crack (Dangerous Neck Snap taunt)
    Reply With Quote #8

    as far as i tested, some weapons change this ID, i got it to consistently happen when using the buff banner or whip, but rocket launcher returns 150
    __________________
    Discord: eridreemurr
    Github: https://github.com/StShAzzy/
    RaphtaliaTheTanooki is offline
    RaphtaliaTheTanooki
    Member
    Join Date: Jul 2020
    Location: Brazil, Bahia
    Old 10-10-2023 , 19:48   Re: [TF2] Neck Crack (Dangerous Neck Snap taunt)
    Reply With Quote #9

    this should do it... (it has alot of commented code used in debugging)

    in this version the cvars are

    sm_nk_friendlyfire_bypass // (default: 1) bypasses friendlyfire check for killing allies
    sm_nk_tauntkill // (default: 1) enable taunt killing with the taunt
    Attached Files
    File Type: smx neckcrack.smx (6.3 KB, 42 views)
    File Type: sp Get Plugin or Get Source (neckcrack.sp - 35 views - 4.5 KB)
    __________________
    Discord: eridreemurr
    Github: https://github.com/StShAzzy/

    Last edited by RaphtaliaTheTanooki; 10-11-2023 at 23:55. Reason: better implementation in code
    RaphtaliaTheTanooki is offline
    artvin_boy
    Junior Member
    Join Date: Sep 2020
    Location: Ottoman Empire
    Old 10-10-2023 , 20:32   Re: [TF2] Neck Crack (Dangerous Neck Snap taunt)
    Reply With Quote #10

    nice
    __________________
    Sup.
    artvin_boy 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 00:12.


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