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

[L4D2|LINUX] moreinfected


Post New Thread Reply   
 
Thread Tools Display Modes
Author
arthurdead
Senior Member
Join Date: Jul 2013
Plugin ID:
7589
Plugin Version:
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 04-06-2021 , 17:44   [L4D2|LINUX] moreinfected
    Reply With Quote #1

    this plugins hooks infected spawning functions and delegates it to plugins based on a config file

    plugin:
    https://github.com/arthurdead/sm-plu...oreinfected.sp
    gamedata:
    https://github.com/arthurdead/sm-plu...reinfected.txt

    you NEED DHooks2 with detour support:
    https://github.com/peace-maker/DHooks2

    OPTIONALLY requires:
    https://forums.alliedmods.net/showthread.php?t=330933 for server-side infected
    https://forums.alliedmods.net/showthread.php?t=331025 for navmesh place support
    https://forums.alliedmods.net/showthread.php?t=331191 for death animations on bonemerged models

    for example you have a file like this:

    sourcemod/data/moreinfected.txt
    Code:
    "moreinfected"
    {
    	"re_classiczombie"
    	{
    		"class_flags" "common"
    		"weight" "20"
    		"plugin" "re_npcs.smx"
    	}
    	"re_tyrant"
    	{
    		"class_flags" "tank|witch"
    		"weight" "100"
    		"plugin" "re_npcs.smx"
    	}
    	"special_common_infected"
    	{
    		"alias" "infected"
    		"class_flags" "common"
    		"hook" "post"
    		"weight" "50"
    		"plugin" "moreinfected.smx"
    		"data"
    		{
    			"bonemerge" "1"
    			"server" "1"
    			"gender" "male"
    
    			"variations"
    			{
    				"0"
    				{
    					"model" "models/infected/hulk.mdl"
    					"weight" "25"
    				}
    				"1"
    				{
    					"model" "models/infected/smoker.mdl"
    					"weight" "25"
    				}
    			}
    		}
    	}
    }
    every time a common infected is spawned the plugin will get a random entry from the file based on the weight value that has the "common" class_flags then a function named "{entryname}_spawn_common" will be called in the specified plugin
    for special infected its the same deal except the function name is "{entryname}_spawn_special"
    plugins should not precache stuff OnMapStart but instead make a function named "{entryname}_precache"

    this plugin was mainly made to be used with this:
    https://forums.alliedmods.net/showthread.php?t=331025

    heres a unfinished example:
    https://github.com/arthurdead/sm_npc...ing/re_npcs.sp

    Last edited by arthurdead; 04-20-2021 at 01:04.
    arthurdead 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 10:03.


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