Raised This Month: $ Target: $400
 0% 

BlackOut


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 10-03-2007 , 21:13   BlackOut
Reply With Quote #1

im trying to edit a plugin M249-M4A1 made it BlackOuts Maps
Would this work?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#define PLUGIN "Map Blackout"
#define VERSION "1.0"
#define AUTHOR "M249-M4A1"
new p_lights
public plugin_init() {
 
register_plugin(PLUGINVERSIONAUTHOR)
 
register_concmd("amx_blackout""BlackOut",ADMIN_IMMUNITY,"- Turns All Lights Off")
 
p_lights register_cvar"amx_blakcoutlights""a" );
}
public 
BlackOut() {
 new 
mapname[33]
 
get_mapname(mapname32)
 
  
set_lights(float(get_pcvar_num(p_lights)), id)
  
 return 
PLUGIN_HANDLED

__________________

Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 10-03-2007 , 21:26   Re: BlackOut
Reply With Quote #2

First of all, set_lights affects the environment light, and it also requires a string be passed into it (letters a-z)

Secondly, you wouldn't need mapname and all that junk, since getting the map name isn't something your plugin doesn't focus on.

Thirdly, a plugin already exists to adjust the light when an admin does amx_light <a-z> or <1-26>
Check: http://forums.alliedmods.net/showthread.php?t=3395

So to answer your question, no, it won't work. Good try, though!
__________________

Last edited by M249-M4A1; 10-03-2007 at 21:29.
M249-M4A1 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode