Code:
/*
* Plugin: Gnome Builder
*
* Features:
* -> gnome model
* -> speed, armor, health changes
* -> double speed build/weld (-attack)
* -> crazy knockback on hit
* -> not allowed to pick/get HA/JP/heavy weapons
* -> uses resized weapons
* -> commander can gnome and ungnome people
* -> cant move further than defined Commchair radius
* -> gnome self-welding (look at feet and weld)
* -> gnome cant go commander (only if only alive player he can)
*
* Author:
* -> White Panther, Zamma
*
* Modeler:
* -> Depot (ds^Depot)
*
* Tester:
* -> Depot (ds^Depot), White Panther
*
* Credits:
* -> -mE- - for teleport effect
* -> esuna - for the pick model
*
* Usage:
* COMMANDS:
* - amx_gnome <on / off OR 1 / 0> -> turns Gnome on and off
* - amx_gnome_make <name> -> specified player becomes gnome, no name = random player
* - amx_ungnome -> all Gnomes become normal players
* CHAT:
* - in chat say "/gnomeme" or "/gnome me" to become a gnome
* - in chat say "/ungnomeme" or "/ungnome me" to become normal marine (only if the only player)
* - if commander: say "/gnome <username>", player with username becomes gnome
* say "/ungnome", player who is gnome will become normal marine
*
* CVARS:
* - mp_gnome_damage_amplifier -> damage multiplier for gnome weapons (default 3.0)
* - mp_gnome_damage_pick_only -> define if only pick gets damage multiplier (default on)
* - mp_gnome_auto -> defines if gnome if automatically created on countdown (default off)
*
* v0.3.3:
* - initial release
*
* v0.4.2:
* - fixed:
* - possiblity of regaining normal speed after death
* - "/ungnome" needed a name
* - double weld/build working correctly (its double now not only a bit faster)
* - new random gnome could have ha/jp/heavy weapons
* - camera view is adjusted to gnome height
* - getting resuply while being digested
* - gnome could respawn with hmg/gl/shotty in combat
* - added:
* - welding people is now at double speed/damage too
* - gnome cannot get out of commchair radius (you can increase with new Commchairs)
* - gnome self-welding
*
* v0.5.1:
* - fixed:
* - acidrocket and spit have not done knockback
* - parasite / spike / spore did knockback
* - gnomes pick does more damage (default twice)
* - med packs are now only picked up if needed
* - when gnomed in ns games lmg is not dropped anymore
* - added:
* - gnome can only go Commander if he is the only player or the only marine alive
* (if a marine spawns and gnome is not the only alive marine after 10 secs, he gets ejected)
* - player can gnome/ungnome himself:
* - in combat he can gnome anytime if there is no other gnome (but not ungnome, would be too unfair though)
* - in ns he can gnome and ungnome if he is the only player
* - a define to choose if only pick should make extra damage
* - when gnome gets ungnomed, he will receive his old equipment (in ns only if not died)
* - cvar for amplified damage and if only pick is allowed to use it
* - "mp_gnome_damage_amplifier" (default 3.0) and "mp_gnome_damage_pick_only" (default on)
*
* v0.5.6b:
* - fixed:
* - gnome could respawn with hmg/gl/shotty in combat (again)
* - when carrieng heavy weapon and got gnomed, no primary weapon existed
* - when gnome got jetpack (with another plugin or cheats) his model changed to normal marine with jetpack
* - added:
* - cvar to enabled auto gnome or not (on round start and when gnome leaves)
* - "mp_gnome_auto" (default off)
* - support for MvM
* - u can now disable and enable the plug (amx_gnome 1/0) (old amx_gnome is now amx_gnome_make)
* - with the define "GNOME_MODEL_COLOR" you can specify the gnome color in normal ns and co maps (look a bit more down)
* - changed:
* - auto gnome disabled for default
* - now there is only 1 model instead of 2 (or 3)
*
* v0.6.3b: (compatability for ExtraLevels2 Rework 0.7.8b or higher)
* - fixed:
* - gnome could do instant kill (when did welder-kill and attacked this enemy again (after respawn) without attacking/welding others)
* - aliens could get resupply upgrade (it was not working on them though but could spam medpacks everywhere)
* - main CC was seen as build even if destroyed, therefore gnome still had a range ( due to NS, it was only on the main CC )
* - minor runtime errors (due to tasks)
* - resupply now works on 32 players
* - spit and acidrocket could do a pull instead of a knockback
* - in MvM: when blue gnome exists, the red gnome wont work correctly
* - gnome can be on alien team (only due to other plugins possible)
* - player could lose upgrades after he gnomed in combat (armor powerups, motion tracking, ...)
* - gnome could not do extra damage versus buildings
* - gnome could get knockback when damaged by doors, water, ...
* - added:
* - ExtraLevels2 Rework compatability (+)
* - changed:
* - it is now a bit easier for gnome to weld self
* - way of setting fov
* - gnome does not have a CC-range in co maps anymore
* - code improvements
*
* v0.6.4:
* - added:
* - define for NS 3.03 (marine armor has increased)
* - changes:
* - moved from pev/set_pev to entity_get/entity_set
*
* v0.6.6:
* - fixed:
* - runtime error when someone gnomed
* - changed:
* - code improvements
*
* v0.6.8:
* - changed:
* - way of checking if MvM combat is running
* - fakemeta module not needed anymore
* - fun module not needed anymore
*
* v0.7:
* - fixed:
* - exploit where player could get resupply for free when using any version of extralevels
* - changed:
* - server_frame is hooked with ent and support other plugins that uses the same system (speed improvement thx OneEyed)
* - rewrote check if gnomoe is in CC range to improve speed
*
* v0.7.3:
* - fixed:
* - player was not able to gnome on NS classic
* - bug where commander could only use the gnome command once
* - when commander ungnomed someone wrong name was shown
* - gnome could go commander even when not allowed (when he is not the only alive player in team)
* - changed:
* - adjusted jump height to his size (3 defines added for each coord)
*
* v0.7.4b:
* - fixed:
* - Gnome could not do any damage (since Amx Mod X 1.5x)
*
* v0.7.5:
* - fixed:
* - Gnome could not do any damage (finally done)
* - only when using extralevels2 rework:
* - gnome armor upgrade has not been reset
*
* v0.7.5b:
* - fixed:
* - fixed runtime error on NS maps since amx mod X 1.6
*
* v0.7.6:
* - fixed:
* - commander saw gnome with low health even if he had full
* - pointing at gnome now displays correct health and armor percentage (before, gnome was always seen as damaged)
* - gnome was able to ungnome even when more players have been in his team
* - added:
* - with amx_gnome_make and following a name will now gnome that specified player
*
* v0.7.7:
* - fixed:
* - due to NS 3.1:
* - player saw Pick even when changing weapon
* - going to readyroom will now correctly reset gnome
* - gnome could lose his upgrades on CO
*
* v0.8.0: (compatability for ExtraLevels 3 1.2.4 or higher AND MvM_allinone 2.0.3 or higher / older ExtraLevels OR MvM_allinone versions will not work or possibly crash server)
* - fixed:
* - runtime error
* - resupply is now acting as in NS 3.1.x and not 3.0
* - when ungnomeing and old class was Jetpack or HA, then these items could be dropped and other players could pick them up
* - players will no longer see that resupply can be purchased in popup menu
* - cvar "mp_gnome_auto" was not working
* - changed:
* - new way of communication with ExtraLevels 3
* - time commander has to wait before he can ungnome someone increased 30 -> 60 seconds
* - improved method to recognize resupply
* - entity_get/set_xxx replaced with pev/set_pev ( performance )
* - removed support for NS 3.0.2 or lower ( not needed anymore )
*
* v0.8.1:
* - fixed:
* - aliens could lose their armor when being welded
*
* v0.8.2: (compatability for ExtraLevels 3 v1.3.0 / older ExtraLevels 3 versions will be buggy)
* - fixed:
* - runtime error when player ungnomed
* - added:
* - support for "Helper"
* - changed:
* - if ExtraLevels 3 is loaded gnome does not calculate player level on its own
* - new message functions for better ExtraLevels 3 support
*
* v0.8.3:
* - fixed:
* - crash bug
* - correct resupply effect is now used
* - changed:
* - some code tweaks
*
* v0.8.4:
* - fixed:
* - crash bug on round end (*)
*
* v0.8.5:
* - fixed:
* - player could get resupply without spending any point
* - changed:
* - back to normal server frame
*/
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <ns>
ExtraLevels 3
Gnome + Models (download here) (download models from below)