/********************************************* ******************************
* amx_ejl_laserweapon.sma version 2.7 Date: 3/2/2003
* Author: Eric Lidman
* Alias: Ludwig van
*
* Add a laser weapon to Half-Life mod. Fire a laser beam that acts like
* a real weapon. Takes different damage depending what body zone it hits.
* All mods can use the laser, but if you run Counter-Strike, the plugin
* keeps track of all laser related stats in a statsme style. Laser stats
* restart on the first day of every month. There is FX like smoke clouds,
* the laserbeams themselves, explosions, laser burns where laserbeam
* strikes, etc. (burn decals may be an issue with latest hlds, if so, you
* can turn burn decals with a cvar). If you run the CS missile plugin,
* the lasers can shoot down the missiles. Also, stats can be tracked by
* AUTHID or IP address meaning now lan CS servers can take advantage of
* the stats. Also lasers are sensitive to the mp_friendlyfire cvar. If
* freindly fire is on, lasers can hurt your teammates, and if off, team-
* mates can be shot without damage. This plugin has built in TK punish
* features that can be set to light punishments, or severe.
*
* PODBOT: If using my podbots controller, podbots use this plugin too.
*
* Admin Commands:
*
* amx_lasers -- toggles on and off lasers enabled
* amx_laserbuying -- toggles on and off laser buy requirements
* amx_write_laserstats -- forces laser stats to be printed to file
* on the next map change. ejl_laser_stats.ini
* file is not deleted. Note that the log file
* produced by this command is a text file
* which can be posted on your website.
* amx_del_laserstats -- prints laser stats to file immediately then
* deletes ejl_laser_stats.ini and clears all
* laser stats from memory
*
* Client Command:
*
* amx_firelasergun <color> -- bind a key to it and use as fire button
*
* You can use the colors: white,red,green,blue,yellow,magenta,and cyan.
* If you dont specify a color, a default color will be used. You can
* also specify a custom color by making one out of the 3 primary colors
* red, green, and blue. Preceed your color # with an exclaimation point,
* then without any spaces type three 3 digit numbers ranging from 0-255.
* Example: (255 red, 10 green, 189 blue)
*
* bind mouse1 "amx_firelasergun !255010189"
*
* More client commands:
*
* say /laser -- show window with info about use of laser
* say /laserstats -- show window with top 15 in laserstats
* say /laserstats2 -- show window with laserstats for map
* say /laserstatsme -- show window with your personal laserstats
*
* CVARs: put in your admin.cfg for your defaults
*
* amx_luds_lasers 1 --0 to disable lasers
* amx_laserstats_on 1 --0 to not use any of the laser stats
* amx_laser_buy 0 --1 requires laser shots to be purchased
* amx_laser_cost 100 --ammount of money taken each time you
* shoot the laser
* amx_laser_maxtemp 3440 --temperature at which point your laser
* overheats and explodes thus killing you
* amx_laser_ammo 50 --number of laser shots given per round
* for free to clients in amx_laser_buy is 0
* amx_laser_burndecals 1 --default is set to use decals so there is
* an appearance of a burn where a laser
* shot strikes, but because HL has some
* decal inconsistencies from copy to copy,
* the wrong decals might be used making the
* plugin look stupid. Set this cvar to 0
* if you are having laser decal problems
* amx_laser_allowinvis 1 --default is set to allow invisble/nearly
* invisible laser beams. Set to 0 so
* clients cannot set their laser invisible
* amx_laser_obeyffcvar 1 --if mp_friendlyfire is 1 and this cvar is
* set to 0, this plugin will act as if
* friendlyfire is off ... even if its on.
* amx_laser_tkpunish1 1 --if friendlyfire is on, this sets the
* ammount of automatic retribution for
* shooting teammates in mirror damage stlye
* 0 = no damage to team hurter
* 1 = exact mirror damage to team hurter
* 2 = double damage to team hurter
* amx_laser_tkpunish2 1 --if friendlyfire is on, this sets the type
* of punishment given if you kill a certain
* number of teammates detemined by the cvar
* amx_laser_tkpunish3. Can be set 0, 1, or 2
* 0 = no action
* 1 = kick off server
* 2 = ban for 3 hours
* amx_laser_tkpunish3 3 --if friendlyfire is on, on killing this
* many of your teammates, the plugin takes
* the action set by amx_laser_tkpunish2 cvar
* amx_laser_trackbyip 0 --for the laserstats, by default this plugin
* tries to track players stats by AUTHID, if
* set to 1, it will use IP addresses instead
* If you run a lan server, the plugin auto-
* matically choses to track by IP address.
* amx_laser_showip 0 --for the laserstats, if you do the command
* to write the stats to a file for display
* or wait for the one that is made auto-
* matically at the end of each month, you
* may want to hide players personal info
* like thier IP address. Default is to hide
* set to 1 to show IPs or AUTHIDs
*
* Additional info:
*
* Laser kills and damage are sent to the sever logs in the same format
* as normal kills and damage. A log parser (like pysychostats) should be
* able to take the log output of this plugin and include them in the
* stats output. Laser kills count on the CS scoreboard, but are only
* refeshed at the end of each round. This is for CS only by the way.
* Plugin may cause some lag at round end depending on the size and power
* of the server, but it never does anything to cause lag during gameplay.
* If its a problem, turn off the amx_laserstats_on cvar (set to 0).
*
* If you have the module from SpaceDude's warcraft3 plugin (war3_ms) you
* can make the death messages look more real, so laser kills look like an
* actual player killing another player instead of a suicide on the part
* of the killed player. To enable this, you need to change the code
* below. Simply change the value to 1 where it has #define use_war3 0
* Its simple, a one line change, thats it, compile and its ready to go.
*
********************************************* *****************************/
Ported from Ludwig's great AMX plugin:
http://djeyl.net/forum/index.php?showtopic=9653&st=0