= Laser Suit Plugin by Jengerer =
NOTE: THIS PLUGIN IS CURRENTLY DESIGNED FOR 2FORT AND WELL ONLY, FOR TESTING PURPOSES. READ BELOW DESCRIPTION FOR DETAILS.
In 2fort, the suit spawns on the bridge, and in well, it spawns in the middle of the "bunker". This is my 2nd plugin, so feedback would be greatly appreciated!
Code:
// Laser Suit Plugin by Jengerer
//
// Description:
// This plugin places a suit at a predefined location, and when picked up,
// gives players the Laser Suit ability. When players are within a certain
// distance of the suit bearer, they are hurt at a certain rate and damage.
// When the suit-bearer is killed, the killer gets the suit. If the player
// who has the suit on kills himself, the suit is brought back to its
// spawn point.
//
// CVars:
// - amx_ls_interval (Changes the time between shots. [DEFAULT 3 SECONDS])
// - amx_ls_damage (Changes the damage per shot. [DEFAULT 5 DAMAGE])
// - amx_ls_glow (Changes whether suit-bearer glows. [DEFAULT 1])
// - amx_ls_distance (Changes the maximum distance for attack. [DEFAULT 1000])
// - amx_ls_limit (Changes the limit of players allowed to attack. [DEFAULT 1 PLAYER])
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#define PLUGIN "Laser Suit"
#define VERSION "1.0"
#define AUTHOR "Jengerer"
#define SUIT_MODEL "models/y_armor.mdl"
#define SUIT_POWER "sprites/laserbeam.spr"
#define CLASSNAME "info_target"
#define GRAB_DISTANCE 50
Currently, only 2fort and well are made, because I think it's kind of inconvenient the way I made it work. If someone can let me know how I can store coordinates in a .txt or .ini and load them from within Pawn, that would be cool. Preferably, to have a .txt for each map and the coordinates can be stored inside.
Please inform me of bugs or improvements that can be made.
Quote:
Changelog:
V1.0 Released - 2fort & Well Supported Only
|