Thread: Light Setting
View Single Post
Author Message
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 04-15-2008 , 02:23   Light Setting
Reply With Quote #1

This simple plugin allows any admin with a certain level of access to change the map lighting scheme.

Command:
sm_lighting <#level|pattern> [style]

Valid #level is from #0 to #12, and corrospond to the following:

Code:
	// 0 normal
	"m",
	// 1 FLICKER (first variety)
	"mmnmmommommnonmmonqnmmo",
	// 2 SLOW STRONG PULSE
	"abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba",
	// 3 CANDLE (first variety)
	"mmmmmaaaaammmmmaaaaaabcdefgabcdefg",
	// 4 FAST STROBE
	"mamamamamama",
	// 5 GENTLE PULSE 1
	"jklmnopqrstuvwxyzyxwvutsrqponmlkj",
	// 6 FLICKER (second variety)
	"nmonqnmomnmomomno",
	// 7 CANDLE (second variety)
	"mmmaaaabcdefgmmmmaaaammmaamm",
	// 8 CANDLE (third variety)
	"mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa",
	// 9 SLOW STROBE (fourth variety)
	"aaaaaaaazzzzzzzz",
	// 10 FLUORESCENT FLICKER
	"mmamammmmammamamaaamammma",
	// 11 SLOW PULSE NOT FADE TO BLACK
	"abcdefghijklmnopqrrqponmlkjihgfedcba",
	// 12 UNDERWATER LIGHT MUTATION
	// this light only distorts the lightmap - no contribution
	// is made to the brightness of affected surfaces
	"mmnnmmnnnmmnn",
Patterns may be any combination of alphabet characters.
Default style is 0, style may be from 0 to 63.

Note: This plugin cannot set clients dynamically, it can only set them as they come in, or on map change.
I recommend having the command execute OnMapChange, so everyone gets set.
I used this for night fighting on my HL2DM server, so I figured I'd post it.

First public plugin on SM, yay!
Attached Files
File Type: sp Get Plugin or Get Source (sm_lights.sp - 4006 views - 2.9 KB)
__________________

Last edited by Twilight Suzuka; 04-24-2008 at 16:42.
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka