View Single Post
Author Message
Caps Lock Fuck Yeah
Member
Join Date: Oct 2010
Old 01-15-2011 , 07:40   [L4D2] Matrix Time (V1.3)
Reply With Quote #1

Hello.
This is my first plugin that actually provides some content.
What it does is when the survivors kill a specific number of zombies(configurable by cvar), They can activate a period of slow-motion(Also configurable by cvar).
The cvars are...
Code:
// This file was auto-generated by SourceMod (v1.4.0-dev)
// ConVars for plugin "l4d2_matrix_time.smx"


// Should a message be announced when you activate slowdown?
// -
// Default: "0"
l4d2_mt_adminannounce "0"

// Matrix time duration, multiplied by resulting timescale modification
// -
// Default: "10"
l4d2_mt_duration "10"

// Zombie glow color
// -
// Default: "255"
l4d2_mt_glowcolor "255"

// Should infected glow during matrix time?
// -
// Default: "1"
l4d2_mt_glowenabled "1"

// Kills needed to enable matrix time
// -
// Default: "50"
l4d2_mt_killsneeded "50"

// Matrix timescale multiplier
// -
// Default: "0.2"
l4d2_mt_multiplier "0.2"

// Reset the players killcount at round end?
// -
// Default: "0"
l4d2_mt_resetonend "0"

// Current version of Matrix Time
// -
// Default: "1.1"
matrixtime_version "1.1"
There are 2 commands
  • sm_matrixkills - Shows how many more kills are needed to be able to activate Matrix Time
  • sm_forcematrix - Admin command, Toggles Slow Motion for a specified amount of time

A youtube video is here, I made it at 40 am in 10 minutes, so i will probably upload a new one sometime later.
Code:
http://www.youtube.com/watch?v=l2pbpT709LA
Credit goes to McFlurry for his work in the l4d2 Zed Time plugin.

Update 1.1
Code:
Added Green colored text
When a client activates Matrix Time, A message is printed with their name, and expected duration
Added a check so that Matrix Time can only be run by one person at a time
Added a bot-check.
Changed the activation method from Crouch and Shoot, to Crouch and +use
Update 1.2
Code:
Added 2 new cvars(l4d2_mt_glowenabled,l4d2_mt_glowcolor)
l4d2_mt_glowenabled makes every common zombie glow.
l4d2_mt_glowcolor changes the glow color, it has an interesting way of working, so try it out, 255 is bright red, 255255255 is banana yellow.
Update 1.3
Code:
Added 2 new admin commands, sm_glowzomies, sm_stopglow
Fixed a rather silly spelling error
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_matrix_time.sp - 4345 views - 8.3 KB)

Last edited by Caps Lock Fuck Yeah; 03-04-2011 at 18:43. Reason: Update 1.3
Caps Lock Fuck Yeah is offline