Raised This Month: $64 Target: $400
 16% 

[L4D2] Helms Deep Sourcemod Enabler


Post New Thread Reply   
 
Thread Tools Display Modes
Author
canadianjeff
Member
Join Date: Sep 2016
Plugin ID:
6301
Plugin Version:
1.0.0
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows for the running of the helms deep reborn map on a sourcemod server and responds to built in commands
    Old 10-16-2018 , 02:19   [L4D2] Helms Deep Sourcemod Enabler
    Reply With Quote #1

    Description:
    Allows for the running of the helms deep reborn map on a sourcemod server and responds to built in commands

    Installation:
    put l4d2_helmsdeep.smx into /addons/sourcemod/plugins

    Credits:
    everyone who helped me in the sourcemod discord server

    The author of the map placed code inside the .vpk in a .nut file with the following code that would check if sourcemod was running and kick everyone who tried to join
    Code:
    	if ( !HelmsServerInfo.checked_plugins )
    	{
    		local metamodVersion = Convars.GetStr("metamod_version");
    		local sourcemodVersion = Convars.GetStr("sourcemod_version");
    	
    		if ( !metamodVersion && !sourcemodVersion )
    			HelmsServerInfo.has_plugins = false;
    		else
    			HelmsServerInfo.has_plugins = true;
    		
    		HelmsServerInfo.checked_plugins = true;
    	}
    	
    	if ( HelmsServerInfo.has_plugins )
    	{
    		foreach( player in Players.Humans() )
    		{
    			SendToServerConsole( "kickid " + player.GetSteamID() + " " + "This server is using plugins, please join a different server" );
    		}
    	}
    what this plugin does is intercept the kickid command (with that matching string) and stop it from being used and allowing all players to join

    Updates:
    Now has better map detection (by request)
    Psyk0tik (discord) has improved the donator command
    Now it is menu driven to get the item you want
    Has the cvar to enable or disable the donator menu
    Updated Syntax (by request)
    Now has spawn limits to prevent spamming
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_helmsdeep.sp - 100 views - 5.4 KB)

    Last edited by canadianjeff; 10-17-2018 at 05:52. Reason: Updated to 1.0.0
    canadianjeff is offline
    Crasher_3637
    AlliedModders Donor
    Join Date: May 2012
    Old 10-16-2018 , 03:09   Re: [L4D2] Helms Deep Sourcemod Enabler
    Reply With Quote #2

    I wasn't aware this was even an issue. Great job!



    The authors of this map probably didn't want SM to conflict with the vscripts they use for the map.
    __________________
    AFK like JFK
    Crasher_3637 is offline
    Spirit_12
    Veteran Member
    Join Date: Dec 2012
    Location: Toronto, CA
    Old 10-16-2018 , 03:38   Re: [L4D2] Helms Deep Sourcemod Enabler
    Reply With Quote #3

    Update syntax!
    __________________
    Spirit_12 is offline
    canadianjeff
    Member
    Join Date: Sep 2016
    Old 10-16-2018 , 04:59   Re: [L4D2] Helms Deep Sourcemod Enabler
    Reply With Quote #4

    the sourcecode is provided so if you want to modify it please do
    canadianjeff is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 10-16-2018 , 06:27   Re: [L4D2] Helms Deep Sourcemod Enabler
    Reply With Quote #5

    Good job, the alternative method I was telling people to hex edit and replace the code with spaces.


    Mix of old and new syntax and remove the .SMX it's not required since the plugin compiles on the forum when you click 'Get Plugin').

    and what's this about?
    PHP Code:
    if (strcmp(sArgs"!donator"false) == 0
    Something for your personal server? You should use command listener and to listen to sm_donator and not checking for /donator or !donator strings.

    Right now ANYONE can join and type !donator to be given items, as many times as they want. Please keep this off the public release since it's totally unrelated to what this plugin is doing.

    You don't need to CreateEntity to give the items, just use the function GivePlayerItem.
    __________________

    Last edited by Silvers; 10-16-2018 at 06:32.
    Silvers is offline
    Crasher_3637
    AlliedModders Donor
    Join Date: May 2012
    Old 10-16-2018 , 09:03   Re: [L4D2] Helms Deep Sourcemod Enabler
    Reply With Quote #6

    Quote:
    Originally Posted by Silvers View Post
    Good job, the alternative method I was telling people to hex edit and replace the code with spaces.


    Mix of old and new syntax and remove the .SMX it's not required since the plugin compiles on the forum when you click 'Get Plugin').

    and what's this about?
    PHP Code:
    if (strcmp(sArgs"!donator"false) == 0
    Something for your personal server? You should use command listener and to listen to sm_donator and not checking for /donator or !donator strings.

    Right now ANYONE can join and type !donator to be given items, as many times as they want. Please keep this off the public release since it's totally unrelated to what this plugin is doing.

    You don't need to CreateEntity to give the items, just use the function GivePlayerItem.
    LOL

    THAT is probably one of the reasons why the authors don't want SM to run with the map. They won't get anymore donations if people just use SM to give players all the custom melee weapons when they type "!donator"!

    I can see why this guy used a command listener for it. xD
    __________________
    AFK like JFK
    Crasher_3637 is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 10-16-2018 , 10:28   Re: [L4D2] Helms Deep Sourcemod Enabler
    Reply With Quote #7

    Quote:
    Originally Posted by Crasher_3637 View Post
    LOL

    THAT is probably one of the reasons why the authors don't want SM to run with the map. They won't get anymore donations if people just use SM to give players all the custom melee weapons when they type "!donator"!

    I can see why this guy used a command listener for it. xD
    That's actually part of the map? How lame. The command should be limited to that map only then. Since you're not listening for any command, why not RegConsoleCommand("sm_donator") ?
    __________________

    Last edited by Silvers; 10-16-2018 at 10:31.
    Silvers is offline
    404UNF
    ( ͡ ͜ʖ ͡)
    Join Date: Dec 2011
    Location: 🍁
    Old 10-16-2018 , 20:21   Re: [L4D2] Helms Deep Sourcemod Enabler
    Reply With Quote #8

    Quote:
    Originally Posted by canadianjeff View Post
    The author of the map placed code inside the .vpk in a .nut file with the following code that would check if sourcemod was running and kick everyone who tried to join
    Wouldn't this be fixable by extracting the VPK contents, and re-VPKing them without that .nut file?
    __________________
    I'm not a SourcePawn expert, I just play one on TV.
    Want to join the SourceMod Discord server? Click here!

    404UNF is offline
    Crasher_3637
    AlliedModders Donor
    Join Date: May 2012
    Old 10-16-2018 , 20:37   Re: [L4D2] Helms Deep Sourcemod Enabler
    Reply With Quote #9

    Quote:
    Originally Posted by 404UNF View Post
    Wouldn't this be fixable by extracting the VPK contents, and re-VPKing them without that .nut file?
    From a server owner's perspective, that can be easier said than done.
    __________________
    AFK like JFK
    Crasher_3637 is offline
    404UNF
    ( ͡ ͜ʖ ͡)
    Join Date: Dec 2011
    Location: 🍁
    Old 10-16-2018 , 20:45   Re: [L4D2] Helms Deep Sourcemod Enabler
    Reply With Quote #10

    Quote:
    Originally Posted by Crasher_3637 View Post
    From a server owner's perspective, that can be easier said than done.
    It'd take me about a minute to do it

    Extract contents from VPK into a folder using GCFScape, delete .nut file, click and drag folder onto vpk.exe file in like, steamapps/common/Team Fortress 2/bin, done. VPK.exe generates a new VPK file of the map and whatever else, minus the .nut. Or, better yet, modify the .nut to make it harmless. I doubt the map requires the files existence to run. I'm not sure what a .nut file is either, nor am I sure how it would even get initialized (unless there's some entity in the map that calls it somehow?), but it sounds fairly easy to remove the damn thing outright.
    __________________
    I'm not a SourcePawn expert, I just play one on TV.
    Want to join the SourceMod Discord server? Click here!


    Last edited by 404UNF; 10-16-2018 at 20:48.
    404UNF 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 19:26.


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