Newer version and support: http://forums.alliedmods.net/showthread.php?t=233160
[TF2] Disguise Jutsu
Version 3.0
Introduction:
This plugin is based from the disguise jutsu ability from the RMF ability pack.
https://forums.alliedmods.net/showthread.php?t=99871
Allows the player to disguise themselves as different models just for fun.
Convars:
sm_disguise_enabled (Default: 1)
1 - Enabled
0 - Disabled
sm_disguise_join (Default: 0) - Should people who spawn get the ability to use disguise jutsu?
0 - No
1 - Public
2 - Admin Generic
sm_disguise_gib (Default: 1) - Should there be gibs after the model is destroyed? (Only on some models)
1 = Yes
0 = No
sm_disguise_size (Default: 1.0) - Default size of models when disguised.
sm_disguise_sound (Default: 1.0) - Should players be allowed to play sounds when disguised?
sm_disguise_stun (Default: 0.0) - Can players get stunned while disguised? 0 = No, 1 = Yes
sm_disguise_cooldown (Default: 10) - How long until players can disguise again?
sm_disguise_timer (Default: 2) - Cooldown before players can play a sound from medic call.
sm_disguise_disabled - Which models should be disabled?
Model Name List for sm_disguise_disabled:
barrel,frog,cart,cow,dispenser,controlpoint,p almtree,briefcase,gift1,gift2,monoculus,ghost ,merasmus,horseman,latern,ammo,med
Commands:
sm_disguiseme - Enabled disguise jutsu on yourself.
sm_disguise <Player> <1: On ; 0: Off>
(e.g sm_disguise @all 1) - Enables disguise jutsu on anyone.
Admin Generic for both commands, use admins override if you want to me sm_disguiseme public.
sm_dmenu - Public command, only players who has disguised jutsu enabled will see it.
(e.g !disguise tak 1 => Makes the player tak able to access !dmenu and can crouch to turn into a model)
Installation:
1. Download disguisejutsu.smx and disguise.cfg.
2. Place the file in sourcemod/plugins folder.
3. Place the file "disguise.cfg" in cfg/sourcemod folder or just load plugin as it auto generates.
4. Restart/Refresh map/plugins.
*If you are updating, reinstall the disguise.cfg file as it may contain new convars!
Usage:
1. Join a server and type !disguiseme or !disguise <player> 1.
2. Type !dmenu to access the model menu.
2. Hold the crouch button and press the middle mouse button.
3. Your now a hidden!
4. You can press the medic button while disguised to play laugh sounds.
Version Log:
Code:
3.0 -
- Code rewrite
- Added sm_disguise_disabled to disable models from menu
- Added sm_disguise_timer as a cooldown before players can play a sound from pressing medic
- Added sm_disguise_cooldown as a cooldown before players can disguise again
- Made some extra checks
- Timers uses GetClientUserId
- Fixed clients not able to disguise
- Clients while disguise can press medic to play random laugh sounds
- Changed the way to disguise, instead of crouching, it is now crouching+middle mouse button
- Attacking will remove disguise
- Removed the speed convar
- Removed the sound timer convar
2.4 -
- Added sounds on disguise(Thanks to snelvuur)
- Added a fade effect from original author
- Added an option to block stun effects on saxton/ff2
- Added 3 cvars to control the sounds and stun
* - Note: Not sure if it will completely block the stun effect for saxton as i think the saxton rage stun is different from the Stun Player plugin i used to test. Saxton stun seems to be able to stun and allow the player to crouch while a regular stun from a bat will not allow you to crouch.
2.3 -
- Fixed Players not able to attack due to OnPlayerRunCmd when not disguised
- Fixed Model being forced to all clients
- Uses a static variable to check for crouching
- No longer uses OnGameFrame, uses a 0.1 second timer instead
- Added Monoculus model
- Added Ghost model (Known issue: particle effect does not go away)
- Added Merasmus
- Added Horsemann
- Added Jacko' Latern
- Added Ammo Kit
- Added Med kit
2.2 -
- Removed the timer teleport for the models
- Added SetCustomModel which replaces the timer teleport and stop the lag
- Fixed sm_disguise_join and also removed admin option
- Player can no longer attack or hurt other players
2.1 -
- Removed the timer Ads to reduce lag
- Fixed and now clears the timer when the user no longer uses the barrel
- Checks if player is in water to prevent any bugs
- A bit of code clean up
2.0 -
- Added colors* requires morecolors.inc to compile
- Added menu option sm_dmenu
- Model now follows the players (Uses a timer to teleport the model, can't seem to parent a model)
- Added option to specify the player's speed when disguised
- Added option to specify if there should be gibs or not. (Disable to stop players from spamming gibs)
- Added an optional timer to display users who has disguise jitsu enabled to be shown about !dmenu
- Added resize option
- Fixed disguise jitsu respawn
- Cleaned some code and messages
- Hopefully fixes a rare problem i haven't encountered...spam of barrels?
- Added frog, cart, cow, dispenser, control point, palm tree, briefcase, halloween gift, regular gift model
1.1 -
-Change precache to mapstart to prevent crashes.
1.0 -
-Released
To Do List:
- Add more models?
- Add the ability to remove certain models from the menu
- Add option to give allow model change menu to no one, public, or admins only
More suggestions would be great
Credit:
- RIKUSYO code on turning people into a barrel.
- snelvuur for sounds on disguise
Enjoy...