Raised This Month: $433 Target: $400
 108% 

[L4D2] Tank Stumble - Grenade Launcher (1.2) [24-Mar-2020]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6980
Plugin Version:
1.2
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Stumbles the Tank when hurt by a Grenade Launcher.
    Old 03-14-2020 , 10:21   [L4D2] Tank Stumble - Grenade Launcher (1.2) [24-Mar-2020]
    Reply With Quote #1

    About:
    • Stumbles the Tank when hurt by the Grenade Launcher projectile.
    • Thanks to "Iizuka07" for the idea and request.


    Cvars:

    Saved to l4d2_tank_stumble.cfg in your servers \cfg\sourcemod\ folder.

    PHP Code:
    // 0=Plugin off, 1=Plugin on.
    l4d2_tank_stumble_allow "1"

    // Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
    l4d2_tank_stumble_modes ""

    // Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
    l4d2_tank_stumble_modes_off ""

    // Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
    l4d2_tank_stumble_modes_tog "0"

    // The distance the Tank must be to the Grenade Launcher projectile impact to stumble.
    l4d2_tank_stumble_range "200.0"

    // Unscope plugin version.
    l4d2_tank_stumble_version 


    Changes:
    Code:
    1.2 (24-Mar-2020)
        - Fixed stupid mistake. Thanks to "tRololo312312" for reporting.
    
    1.1 (19-Mar-2020)
        - Fixed not unhooking OnTakeDamage and affecting the wrong players. Thanks to "tRololo312312" for reporting.
    
    1.0 (14-Mar-2020)
        - Initial release.


    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_tank_stumble.sp - 53 views - 9.3 KB)
    __________________

    Last edited by Silvers; 03-23-2020 at 21:02.
    Silvers is offline
    tRololo312312
    Senior Member
    Join Date: Apr 2015
    Old 03-19-2020 , 08:43   Re: [L4D2] Tank Stumble - Grenade Launcher (1.0) [14-Mar-2020]
    Reply With Quote #2

    OnTakeDamage automatically unhooks or what?
    __________________
    My Plugins: (OUTDATED)
    TFBots on MvM - MedicBot - VSH/FF2 Bots - PLR Bots
    tRololo312312 is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-19-2020 , 08:58   Re: [L4D2] Tank Stumble - Grenade Launcher (1.0) [14-Mar-2020]
    Reply With Quote #3

    No, you're right. Thanks, fixed.
    __________________

    Last edited by Silvers; 03-19-2020 at 09:04.
    Silvers is offline
    tRololo312312
    Senior Member
    Join Date: Apr 2015
    Old 03-23-2020 , 19:47   Re: [L4D2] Tank Stumble - Grenade Launcher (1.1) [19-Mar-2020]
    Reply With Quote #4

    Code:
    public void Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
    {
    	int client = GetClientOfUserId(event.GetInt("userid"));
    	if( client ) SDKUnhook(client, SDKHook_OnTakeDamage, OnTakeDamage);
    }
    
    public void Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast)
    {
    	int client = GetClientOfUserId(event.GetInt("userid"));
    	if( client ) HookClient(client);
    }
    Erm, is this right?
    __________________
    My Plugins: (OUTDATED)
    TFBots on MvM - MedicBot - VSH/FF2 Bots - PLR Bots
    tRololo312312 is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-23-2020 , 21:02   Re: [L4D2] Tank Stumble - Grenade Launcher (1.1) [19-Mar-2020]
    Reply With Quote #5

    Quote:
    Originally Posted by tRololo312312 View Post
    Erm, is this right?
    lol wtf, thanks, fixed.
    __________________
    Silvers 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 12:15.


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