PDA

View Full Version : Changing of Darkness on Maps


{SR} *Raggy*
09-02-2006, 09:23 PM
I was wondering if anyone knew how to change the darkness of a map on DoD?

diamond-optic
09-02-2006, 09:36 PM
this might be sorta like what you're looking for..

http://mods.teamcdrive.com/download.php?view.46

=|[76AD]|= TatsuSaisei
09-02-2006, 09:36 PM
I was wondering if anyone knew how to change the darkness of a map on DoD?


/* AMXX - amx_lights
*
* Copyright 2004, Written by Rattler
* This file is provided as is (absolutely no warranties)
*
* Change Logs
* v1.2 - Added Admin Check
* v1.1 - Added [off] or [OFF] commands
* v1.0 - Actually worked
*
* Commands
* ====================
* amx_lights <a through z> -- Sets the light level
* amx_lights off or OFF -- Normal light level
*
*
* Requirements
* ====================
* The following modules are required
*
* [amxmodx.inc]
* [engine.inc]
* [amxmisc.inc]
*
*
*/
// Declare Commands
//====================
#include <amxmodx>
#include <engine>
#include <amxmisc>
// p2k_lights
//====================
public admin_lights(id,level,cid)
{
if (!cmd_access(id,level,cid,2)){
console_print(id,"[AMXX] You have no access to that command.")
return PLUGIN_HANDLED
}

new cmdarg[32]
read_argv(1,cmdarg,31)

if (equal(cmdarg,"off")||equal(cmdarg,"OFF")){
set_lights("#OFF")
console_print(id,"[AMXX] Light Returned To Normal.")
}
else{
set_lights(cmdarg)
console_print(id,"[AMXX] Light Change Successful.")
}
return PLUGIN_HANDLED
}
// Declare Commands
//====================
public plugin_init()
{
register_plugin("P2K Server Commands","1.2","Rattler")
register_concmd("amx_lights","admin_lights",ADMIN_CVAR,"[a-z] - Light level | [off] - Normal Lights")
}


amx_lights [a-z] - Light level | [off] - Normal Lights

examples:
amx_lights j -set lighting to "j" level
amx_lights off - normal lighting

{SR} *Raggy*
09-03-2006, 10:35 AM
Lol thanks for your replies at the same time. I'll try the both of those plugins. Thanks again guys Ye always help people like me out :)

=|[76AD]|= TatsuSaisei
09-03-2006, 04:01 PM
Lol thanks for your replies at the same time. I'll try the both of those plugins. Thanks again guys Ye always help people like me out :)
LMAO, I realized afterwards that we posted at the same time, and discovered that I had somehow overlooked diamonds code on his site... use his version, I like his stuff, and he writes some easy to read code... I would rather have his name as the author, then some other guy I never met... which is why I switched to his plugin after reading his post...

diamond-optic
09-03-2006, 09:45 PM
lmao... you people are strange

{SR} *Raggy*
09-04-2006, 03:42 PM
LOL I only stated that ye posted at the same time :P