About:
add a wing to the back of the players
this is my first post at the forum and my first try to modify a plugin.
this plugin is a modification of the plugin
hats by "silvers" , so all credits goes to them, i only edited some lines from their code and changed the attachment point to make it perfect with wings.
i tested it on l4d only, but it should works fine for l4d2 since the original plugin "hats" support both games
Requirements :
-
Use Priority Patch
-
ThirdPersonShoulder_detect
-
Extension : Dhook
- Server configured with
DownloadTable FASTDL
Commands :
cmds are the same as the hats plugin cmds
("silvers"hat plugin), only the name "hat" is changed to "wing"
PHP Code:
// All players
sm_wing // Displays a menu of wings allowing players to change wwing they are wearing.
sm_wingoff // Toggle to turn on or off the ability of wearing wings.
sm_wingshow // Toggle to see or hide your own wing.
sm_wingview // ^^
// Admins only (requires "z" flag):
sm_wingclient // Set a clients wing. Usage: sm_wingclient <#userid|name> [wing name or wing index: 0-128 (MAX_wingS)].
sm_wingc // Displays a menu listing players, select one to change their wing.
sm_wingoffc // Toggle the ability of wearing wings on specific players.
sm_wingrandom // Randomizes all players wings.
sm_wingrand // ^^
// Add and remove wing models with these commands.
sm_wingadd // Adds specified model to the config (must be the full model path).
sm_wingdel // Removes a model from the config (either by index or partial name matching).
sm_winglist // Displays a list of all the wing models and indexs (for use with sm_wingdel).
// These commands are useful for editing the wing appearances.
sm_wingsave // Saves the wing origin and angles to the data config.
sm_wingload // Changes all players wings to the one you have.
sm_wingpos // Displays a menu allowing you to adjust the wing position (affects all wings/players).
sm_wingang // Displays a menu allowing you to adjust the wing angles (affects all wings/players).
sm_wingsize // Shows a menu allowing you to adjust the wing size (affects all wings/players).
Config file example(located at sourcemod/data/l4d_wings.cfg):
Code:
"1"
{
"mod" "models/wing.mdl"
"ang" "0.000000 0.000000 0.000000"
"loc" "0.000000 0.000000 0.000000"
"size" "0"
"name" "wing1"
}
Note:
after adding your custom new wing model to the file
l4d_wings.cfg,
dont forget to add its name to the file translation
/sourcemod/translation/wingnames.phrases.txt or else the plugin will
fail to load
Cvars:
Saved to l4d_wings.cfg in your servers \cfg\sourcemod\ folder.
PHP Code:
// This file was auto-generated by SourceMod (v1.10.0.6515)
// ConVars for plugin "l4d_wings.smx"
// 0=Plugin off, 1=Plugin on.
// -
// Default: "1"
l4d_wings_allow "1"
// 0=Disallow bots from spawning with wings. 1=Allow bots to spawn with wings.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_wings_bots "1"
// 0=Off. Other value puts the player into thirdperson for this many seconds when selecting a wing.
// -
// Default: "1.3"
l4d_wings_change "1.3"
// 0.0=Off. How often to detect thirdperson view. Also uses ThirdPersonShoulder_Detect plugin if available.
// -
// Default: "0.3"
l4d_wings_detect "0.3"
// Specify admin flags or blank to allow all players to spawn with a wing, requires the l4d_wings_random cvar to spawn.
// -
// Default: ""
l4d_wings_make ""
// Specify admin flags or blank to allow all players access to the wings menu.
// -
// Default: ""
l4d_wings_menu ""
// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
// -
// Default: ""
l4d_wings_modes ""
// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
// -
// Default: ""
l4d_wings_modes_off ""
// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
// -
// Default: ""
l4d_wings_modes_tog ""
// How transparent or solid should the wings appear. 0=Translucent, 255=Opaque.
// -
// Default: "255"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_wings_opaque "255"
// Prevent pre-caching models on these maps, separate by commas (no spaces). Enabling plugin on these maps will crash the server.
// -
// Default: ""
l4d_wings_precache ""
// Attach a random wing when survivors spawn. 0=Never. 1=On round start. 2=Only first spawn (keeps the same wing next round).
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d_wings_random "1"
// 0=Off, 1=Save the players selected wings and attach when they spawn or rejoin the server. Overrides the random setting.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_wings_save "1"
// 0=Off, 1=When a player is in third person view, display their wing. Hide when in first person view.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_wings_third "1"
// 0=Show wings glowing through walls, 1=Hide wings glowing when behind walls (creates 1 extra entity per wing).
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_wings_wall "1"
Installation:
1 - Download the .zip and extract the files to their respective folders in your servers
2 - Install the requirments list above
Thanks to:
Silvers - Hats plugin Author
https://forums.alliedmods.net/showthread.php?p=1441080
Alliedmods.net Community - all the threads about attachment points and setparent() modifications helps me a lot
, especially
this one
Wings models are from
Deus Ex Nihilo garry's mod workshop