TF2 didn't seem to have vehicles (to me at least), so instead of messing around with sensitive code that would likely crash everything, I decided to make a vehicle plugin from scratch.
commands list
PHP Code:
"sm_ontank" - basically "picks" the tank class for you
"sm_offtank" - takes you off the tank class, especially after you die.
"sm_forcetank" - admin command (root flag) - forces a chosen person or @all/@red/@blue/@bots/@etc... as a tank or not; this command toggles the status of players. If you force a player who's already a tank, they'll just revert to normal.
"sm_reloadtankcfg" - lazy command to reload the CFG generated by the plugin.
And what better vehicle to create in a shooter game than a Tank?
Tank Features:
-Gas power (toggleable from cvar)
~gas can be replenished by medigun or from dispenser
~when gas is depleted, tank player cannot move at all!
-Ability to run over people and objects (the code for this is deprecated and i've since made a better system but the purpose of this plugin is to simply release it)
-Equipped with an SMG and Right-Click/MOUSE2 launches a rocket which has a 4 second cooldown.
-Engineers can fix the tank and reload its SMG turret using their wrench!
-Immune to backstabs until very low health.
-SMG and rockets from the tank have no damage fall off!
-Tanks have are vulnerable to explosives but shrug off bullet and fire damage.
For team oriented gamemodes such as VSH/FF2, the plugin also allows you to block certain teams from becoming tanks and you can limit the amount of tanks per team as well!
Here's a demonstration video made by a friend to showcase all of these features!
http://www.youtube.com/watch?v=nnwbu0Zvsh0
DOWNLOAD ==>
https://drive.google.com/file/d/0B3F...ew?usp=sharing
PHP Code:
// ConVars for plugin "bethetank.smx"
// Acceleration in speed every 0.1 seconds (in Hammer Units/second) of Tank
// -
// Default: "3.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_acceleration "3.0"
// what flag admins need to bypass the tank class limit
// -
// Default: "a"
sm_betank_adminflag_bypass "a"
// (Dis)Allow Tank to be able to use Engineer teleporters
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_allowtele "1"
// how much ammo Tanks will start with
// -
// Default: "1000"
// Minimum: "0.000000"
// Maximum: "99999.000000"
sm_betank_ammo "1000"
// (Dis)Allow Tanks to be playable for BLU team
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_blu "0"
// how many Tanks blu team can have
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "16.000000"
sm_betank_blu_limit "0"
// Crush Damage (ignores uber) done by Tank while it's moving
// -
// Default: "30.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_crushdamage "30.0"
// Enable Player-Tank plugin
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_enabled "1"
// Enable Tanks to be powered via 'gas' which is replenishable by dispensers+mediguns
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_gaspowered "1"
// how much health Tanks will start with
// -
// Default: "1000"
// Minimum: "1.000000"
// Maximum: "99999.000000"
sm_betank_health "1000"
// how much metal to heal/arm Tanks by Engineers
// -
// Default: "25"
// Minimum: "0.000000"
// Maximum: "999.000000"
sm_betank_healthfrommetal "25"
// how much metal to heal/arm Tanks by Engineers mult
// -
// Default: "4"
// Minimum: "0.000000"
// Maximum: "999.000000"
sm_betank_healthfrommetal_mult "4"
// (Dis)Allow Engies to be able to repair+arm Tanks via wrench
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_hpfromengies "1"
// x coordinate for the Gas Meter HUD
// -
// Default: "2.0"
sm_betank_hudx "2.0"
// y coordinate for the Gas Meter HUD
// -
// Default: "2.0"
sm_betank_hudy "2.0"
// Initial Speed (in Hammer Units/second) of Tank
// -
// Default: "40.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_initialspeed "40.0"
// Max Forward Speed (in Hammer Units/second) of Tank
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_maxspeed "100.0"
// (Dis)Allow Tank Rockets to have no Damage Fall-Off and no Damage Ramp-up
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_nofalloffrockets "1"
// (Dis)Allow Tank Turret to have no Damage Fall-Off and no Damage Ramp-up
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_nofalloffturret "1"
// (Dis)Allow Tanks from being able to rocket jump from MOUSE2 rockets
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_norocketjump "1"
// (Dis)Allow Tanks to be playable for RED team
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_betank_red "1"
// how many Tanks red team can have
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "16.000000"
sm_betank_red_limit "1"
// Max Backwards Speed (in Hammer Units/second) of Tank
// -
// Default: "80.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_reversespeed "80.0"
// Time in seconds for Rocket Gun to be able to shoot another rocket, set to 4 by default to match with reload sound
// -
// Default: "4.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_rocketcooldown "4.0"
// Base Damage for Rockets shot by Player-Tank
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_rocketdamage "100.0"
// radius of rocket shot from Main Gun
// -
// Default: "1.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_rocketradius "1.0"
// Speed of Rockets shot by Player-Tank
// -
// Default: "4000.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_rocketspeed "4000.0"
// If tanks are gas powered, how much gas they will start with
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_startingfuel "100.0"
// Base Damage for the SMG Turret shot by the Player-Tank
// -
// Default: "1.0"
// Minimum: "0.000000"
// Maximum: "9999.000000"
sm_betank_turretdamage "1.0"
N-JOY
__________________