AlliedModders Donor
Join Date: Jul 2004
Location: Japan
03-20-2006
, 22:11
Laser/TripMine Entity
#1
Laser/TripMine Entity v3.32
Descliption:
Each player can set LaserMine on the wall.
If get "SZ_GetSpace: overflow on Client Datagram" error of you use old version. Please try v3.05 or later.
Installation:
File Locations: .\addons\amxmodx\scripting\include\lasermine_ const.inc
.\addons\amxmodx\scripting\include\lasermine_ util.inc
.\addons\amxmodx\scripting\lasermine.sma
.\addons\amxmodx\plugins\lasermine.amxx
.\addons\amxmodx\config\plugins\plugin-lasermine.cfg
.\addons\amxmodx\data\lang\lasermine.txt
Modules: [required]: AMXMODX v1.9.0 or Higher. (The end of support for v1.8.2.)
* If you want to compile with 1.8.2, you can use cromchat.inc (by OciXCrom) is required. And no recycle logic is available.
[required]: Cstrike
[required]: Fakemeta
[required]: Hamsandwich
Optional: If use BIOHAZARD or Zombie Plague Plugin.
Please make re-compile for environment.
line 2,3
Code:
//#define BIOHAZARD_SUPPORT
//#define ZP_SUPPORT
Non-Steam is not supported.
Usage:
Code:
Admin Console command lm_remove <userid> - remove all mine. target user.
lm_give <userid> - give mine. target user. (start amount.)
Client command +setlaser or +setlm - ex) bind v +setlaser
- can set lasermine on the wall
+dellaser or +remlm Less than v3.14 (From v3.15, the USE key.) - ex) bind j +dellaser
- can return lasermine in ammo.
buy_lasermine - ex) bind "F2" "buy_lasermine"
- buying lasermine
say "/buy lasermine" or "/lm"
say "/lasermine"
Cvars: (Ver 3.x)
PHP Code:
// ================================================================
// Common Settings.
// ================================================================
// lasermine ON/OFF (1 / 0)
amx_ltm_enable "1"
// lasermine access level (0 = all, 1 = admin only)
amx_ltm_access "0"
// lasermine mode (0 = killing laser, 1 = tripmine)
amx_ltm_mode "0"
// lasermine friendly fire. (0 = off, 1 = on)
amx_ltm_friendly_fire "0"
// Round start delay time. (5 seconds)
amx_ltm_round_delay "5"
// Client command mode. (0 = +USE key, 1 = +setlaser, 2 = each)
amx_ltm_cmd_mode "1"
// ================================================================
// Ammo Settings.
// ================================================================
// round start have ammo.
amx_ltm_amount "1"
// max have ammo and max deploy count.
// but if buymode=0 can not use this setting.
amx_ltm_max_amount "2"
// max deployed count in team.
// Warning: The HL engine supports up to 128 laser.
// So the maximum number per team is limited to 64.
// Claymore mode displays three lasers per piece, so you are limited to 20 per team.
amx_ltm_team_max "10"
// ================================================================
// Buy system Settings.
// ================================================================
// can say cmd buying. 0 is off, 1 is on . (/buy lasermine or /lm)
amx_ltm_buy_mode "1"
// lasermine can buying and deploying team.("ALL", "T" or "TR", "CT")
amx_ltm_buy_team "ALL"
// buying lasermine cost.
amx_ltm_buy_price "2500"
// stay buyzone can buying.
amx_ltm_buy_zone "1"
// kill enemy +money
amx_ltm_frag_money "300"
// ================================================================
// Laser beam design Settings.
// ================================================================
// Laser line visiblilty (0 is invisible, 1 is visible)
amx_ltm_laser_visible "1"
// Laser line color mode. (0 is team color (T=RED, CT=BLUE), 1 is GREEN)
amx_ltm_laser_color_mode "0"
// Team-Color for Terrorist. default:red (R,G,B)
amx_ltm_laser_color_t "255,0,0"
// Team-Color for Counter-Terrorist. default:blue (R,G,B)
amx_ltm_laser_color_ct "0,0,255"
// Laser line brightness. (0 to 255)
amx_ltm_laser_brightness "255"
// Laser line width. (0 to 255)
amx_ltm_laser_width "5"
// Laser hit damage. (Float value!)
amx_ltm_laser_damage "1000.0"
// Laser hit damage mode. (0 is frame dmg, 1 is seconds dmg)
amx_ltm_laser_damage_mode "0"
// Laser hit Cool Time. (laser_damage_mode=1 only, dmg/sec default 1 sec)
amx_ltm_laser_dps "1"
// Laser beam lange (float range.)
amx_ltm_laser_range "8192.0"
// ================================================================
// Laser mine design Settings.
// ================================================================
// Lasermines health. over 1000 is very hard mine :)
amx_ltm_mine_health "500"
// glowing lasermine. (0 is off, 1 is on)
amx_ltm_mine_glow "1"
// Mine glow coloer 0 = team color, 1 = green.
amx_ltm_mine_glow_color_mode "0"
amx_ltm_mine_glow_color_t "255,0,0"
amx_ltm_mine_glow_color_ct "0,0,255"
// Can Broken Mines. 0 = Mine, 1 = Team, 2 = Enemy.
amx_ltm_mine_broken "0"
// Lasermine explosion radius. (Float value!)
amx_ltm_explode_radius "320.0"
// Lasermine explosion damage. (on center)
amx_ltm_explode_damage "100"
// ================================================================
// Misc Settings.
// ================================================================
// Dead Player remove lasermine. 0 = off, 1 = on.
amx_ltm_death_remove "0"
// Waiting for put lasermine. (int:seconds. 0 = no progress bar.)
amx_ltm_activate_time "1"
// allow pickup mine. (0 = disable, 1 = it's mine, 2 = allow friendly mine, 3 = allow enemy mine!)
amx_ltm_allow_pickup "1"
// allow shield difence.
amx_ltm_shield_difence "1"
// Spark Effect.
amx_ltm_realistic_detail "0"
// ================================================================
// Claymore Settings. (Less than v3.14. From v3.15, the deleted.)
// ================================================================
// wire range.
amx_ltm_cm_wire_range "300"
// wire width.
amx_ltm_cm_wire_width "2"
// wire area zone.
// pitch:down 0, back 90, up 180, forward 270(-90)
// yaw :left 90, right -90
//
// wire area center pitch.
amx_ltm_cm_wire_center_pitch "220,290"
// wire area center yaw.
amx_ltm_cm_wire_center_yaw "-25,25"
// wire area left pitch.
amx_ltm_cm_wire_left_pitch "260,290"
// wire area left yaw.
amx_ltm_cm_wire_left_yaw "30,60"
// wire area right pitch.
amx_ltm_cm_wire_right_pitch "260,290"
// wire area right yaw.
amx_ltm_cm_wire_right_yaw "-30,-60"
// wire trial frequency.
amx_ltm_cm_wire_trial_freq "3"
// Mine glow coloer 0 = team color, 1 = green.
amx_ltm_cm_wire_color_mode "0"
// Team-Color for Terrorist. default:red (R,G,B)
amx_ltm_cm_wire_color_t "20,0,0"
// Team-Color for Counter-Terrorist. default:blue (R,G,B)
amx_ltm_cm_wire_color_ct "0,0,20"
// Lasermine Configuration File
echo Executing Lasermine Configuration File
// Bio version : amx_ltm -> bio_ltm
Credits:
Translation Request.
https://forums.alliedmods.net/showthread.php?t=323127
Known issues. Can't break of other breakable object.
Recycling a Damaged Lasermine.
Stuck of very near deployed.
Can't stop when you deploy C4.
Bug where Mines disappears when someone disconnects. (Waiting for reappearance.)
Using an array for my enum, so when I try to compile with 1.9.0 I get an error.
"array sizes do not match, or destination array is too small"
https://forums.alliedmods.net/showthread.php?t=313946
GitHub:
https://github.com/AoiKagase/Amxx-Laser-TripMine-Entity
Changelog
VERSION3.29 Fixed: amx_ltm_realistic_detail bug.
VERSION3.28
VERSION3.27 Fixed: the return value of Native functions.
VERSION3.26 Fixed: Compile error for ZP/BIOHAZARD support.
VERSION3.25 Added: Native and Forward functions.
VERSION3.23
VERSION3.22 Fixed: Undefined pev index.(Typo)
VERSION3.21 The end of suppert for AMXX v1.8.2.
Added: CSX WeaponId.
Fixed: Undefined pev index.
VERSION3.17 Fixed: Compile error for 1.8.2.
VERSION3.16 Fixed: Compile error for ZP.
VERSION3.15 Deleted: Claymore Logic. (Use the Mines Platform .)
Deleted: +dellaser command. (Use the +use key.)
Move: zombie mod logic.
VERSION3.14 Added: Effects in water
Added: Effects explosion cylinder.
Added: Explosion decals.
Added: Laser hit splash.
Fixed: source code refactoring.
VERSION3.13 Added: indicator glow.
Fixed: Deploying position.
VERSION3.12 Fixed: When infected in zombie mode, the team's color does not match the owner.
VERSION3.11 Alpha Test Can be compiled with 1.8.2, but required cromchat.inc by OciXCrom and can not use Recycle logic.
VERSION3.10 Deploy Hologram.
AutoExecConfig Logic.
VERSION3.09 Test. Bug where Mines disappears when someone disconnects.
VERSION3.08 Fixed. Bug where Mines disappears when someone disconnects.
Zombie Plague 5.0.8 Trial support.
VERSION3.07 Fixed RapidDamage Mode.
Fixed BeamThink Logic.
Delete amx_ltm_friendly_fire. => use mp_friendlyfire
Add Chain Explosion.
VERSION3.06 Add Recycle Logic.
Deploy check, ignore player.
VERSION3.05 Fixed of can't break of other breakable object.
Laser penetration.
Test fix stuck bug.
VERSION3.04 add claymore mode and any cvars.
add amx_ltm_realistic_detail.
add amx_ltm_mine_broken.
add admin command[lm_remove, lm_give].
show mine health on hud.
refactoring.
VERSION3.03 support for multi language. (now english only.)
add amx_ltm_shield_difence.
damage logic replaced. (hamsandwich base.)
VERSION3.02 Replace Cvars.amx_ltm => amx_ltm_enable.
amx_ltm_acs => amx_ltm_access.
amx_ltm_ff => amx_ltm_friendly_fire.
amx_ltm_delay => amx_ltm_round_delay.
amx_ltm_cmdmode => amx_ltm_cmd_mode.
amx_ltm_startammo => amx_ltm_amount.
amx_ltm_ammo => amx_ltm_max_amount
amx_ltm_teammax => amx_ltm_team_max.
amx_ltm_buymode => amx_ltm_buy_mode.
amx_ltm_cbt => amx_ltm_buy_team.
amx_ltm_cost => amx_ltm_buy_price.
amx_ltm_fragmoney => amx_ltm_frag_money.
amx_ltm_line => amx_ltm_laser_visible.
amx_ltm_color => amx_ltm_laser_color_mode.
amx_ltm_bright => amx_ltm_laser_brightness.
amx_ltm_dmg => amx_ltm_laser_damage.
amx_ltm_ldmgmode => amx_ltm_laser_damage_mode.
amx_ltm_ldmgseconds=> amx_ltm_laser_dps.
amx_ltm_health => amx_ltm_mine_health.
amx_ltm_glow => amx_ltm_mine_glow.
amx_ltm_radius => amx_ltm_explode_radius.
amx_ltm_rdmg => amx_ltm_explode_damage.
Add Cvars.amx_ltm_buy_zone.
amx_ltm_laser_color_t.
amx_ltm_laser_color_ct.
amx_ltm_laser_range.
amx_ltm_mine_glow_color_mode.
amx_ltm_mine_glow_color_t.
amx_ltm_mine_glow_color_ct.
amx_ltm_death_remove.
amx_ltm_activate_time.
amx_ltm_allow_pickup.
VERSION3.01 fixed amx_ltm_ldmgseconds.
VERSION3.00 Refactoring source code.
fixed. socore bug.
buy mode 0, not check have ammo.
add ltm_death_remove, ltm_put_wait.
required hamsandwich.
VERSION2.3 add ltm_buymode //say cmd buying. 0 is off, 1 is on.
fixed. ltm_startammo.
fixed. explode message codes.
VERSION2.2
VERSION2.1 I integrated Bio with 2.1
add ltm_cmdmode.
supported unlimited money.
fixed. mine size.
VERSION2.0 fixed. score bug.
fixed. ltm_dmg.
VERSION2.0 Release Candidate title changed. "Laser/TripMine Entity"
converted engine to fakemeta.
all cvars changed. amx_lasermine -> amx_ltm.
can apply Cvar immediately.
Limiter cancellation of Cvar.
VERSION1.9 Alpha add amx_lasermine_line. 0 is invisible laserline. 1 is visible laserline.
rollback old cvars style.
VERSION1.8 add amx_lasermine_think (default 0.01: unlagging value > 0.1)
add all cmdline description.
VERSION1.7 add amx_lasermine_ff //set friendly fire. 1 or 0
add amx_lasermine_cbt //set can buy and deploy team. "T" or "CT" or "ALL"
add amx_lasermine_delay //set can buy roundstart +sec. default "15" = 15secs.
and now test unlag.
VERSION1.6 All cvarcmds accesslevel is ADMIN_LEVEL_H.
add amx_lasermine_mode //0 is lasermine,1 is tripmine mode.
add amx_lasermine_radius //set detonate radius.
add amx_lasermine_rdmg //set detonate max damage.
add buy_lasermine //bind key buy_lasermine.
fix teammax bug.
The frag is set with Kill by the blast.
sorry for poor English...
VERSION1.5 say /buy lasermine //cut underbar
add amx_lasermine_teammax cmd //maximum set in team
VERSION1.2Beta2 say /buy_lasermine //buying lasermine
say lasermine //show motd
showammo text "LaserMines: %i" -> "LaserMines Ammo: %i/%i"
---------------------------------------------------------------
BIOHAZARD VERSION 1.2
I integrated Bio with 2.1
add ltm_cmdmode.
supported unlimited money.
fixed. mine size.
BIOHAZARD VERSION 1.1
fixed. +grab bug.
default value change. rdmg and radius.
add radius damage kickback, and revision.
BIOHAZARD VERSION 1.0
add bio_ltm_ldmgmode // 0 - damage / frame, 1 - once damage, 2 - damage / seconds.
add bio_ltm_ldmgseconds //ldmgmode 2 only , default 1 (sec)
add bio_ltm_color //0 is team color, 1 is green
add bio_ltm_bright //laser line brightness. default 255.
BIOHAZARD VERSION 0.9
add bio_ltm_acs //1= admin only
add bio_ltm_glow //1 = glowing mine.
fixed. laser hit system.
fixed. breakable mine.
BIOHAZARD VERSION 0.8
fixed. PrecacheSound Error.
BIOHAZARD VERSION 0.7
fixed. laser Hit system.
fixed. can't deploy mine.
BIOHAZARD VERSION 0.6
fixed. ltm_dmg bug.
code synchronized v2.0
BIOHAZARD VERSION 0.5
fixed +use used hungup.
BIOHAZARD VERSION 0.4
hungup(Zlib error) fixed.
BIOHAZARD VERSION 0.2
change deploy cmd. "+setlaser" -> "+USE" key.
add "bio_ltm_startammo" default 1. start set ammo. 0 is off.
BIOHAZARD VERSION 0.1
ver2.0RC recoding for Bio, release.
all cvars changed. bio_ltm_xxx.
__________________
Last edited by +ARUKARI-; 07-07-2022 at 20:23 .
Reason: v3.32 release.