This is exactly my second released plugin (I think).
Suggested by ffsupra7122000
I give credit to Asskicker and everyone involved in the production of the superhero mod for coming up with a way to give ammo, hopefully I can get it to work correctly on the next release.
Commands:
Cmd: amx_specfun
Parameters: [Weapon Byte = Inifinite] [GodMode 1/0] [ClipMode 1/0]
This command (Flag: ADMIN_KICK) allows you to enter spectator mode with any weapon you want, Godmode (0 = Off, 1 = On) and ClipMode(0 = Off, 1 = On).
Rather than using the actual weapon names, it accepts the weapon byte instead. The weapon byte corresponds with the amx_const.inc, a list of the weapon bytes and what weapons they are can be found at the bottom of the post. As well, you can set as many weapon bytes as you want, no limitations although I do warn you to be wary, repeating the weapon bytes in the arguments may cause the hlds to crash, especially if its with "single" weapons like a c4 (The CS bomb)
ClipMode and GodMode are pretty self explanatory, when you want Godmode set that parameter to 1, if not set it to 0, same goes with Clipmode.
Examples:
You want an M4A1, an AK47, a AWP, Godmode but no Clipmode your arguments would look like this:
amx_specfun 22 28 18 1 0
Lets say you want the same weapons, but no godmod or clipmode:
amx_specfun 22 28 18 0 0
and so on...
How to end it:
Simply join a team.
Problem:
There is a problem with giving ammo, so when you recieve the weapon you won't get max ammo as I wanted. Runnin the same command a few times (3, 4 times) should be enough to give you the max ammo you wanted. Once I get a reply on how to fix this (which is completely stumping me) it'll be fixed and released on the next version.
Cmd: amx_specspawn
This cmd sets the spot you will spawn when you become a spectator. It isn't needed but it keeps you from spawning inside anyone else. Incase you do so happen to spawn in someone else, jumping well get you "out of them"
Problems: For some reason this cmd asks for 2 parameters. I can't seem to figure out why so just add a few numbers at the end and you'll be fine.
Cmd: amx_spectate
amx_spectate allows you to automatically view other clients while your in spectator and dead.
Parameters:
Looker("String") = Name of the person who's going to spectate
Looked At("String") = Name of the person whos going to BE spectated
Mode("Integar") = How your going to view that person, there are 3 seperate ways to view them:
1 = Regular First Person
2 = Third Person View
3 = Top Left View (looking down)
4 = Completely Over the player (Also looking down)
Problems: Still experimenting with it, doesn't work as well as I want it too, next release should hopefully solve this problem. I believe if you use this while your as a spectator and wait for the next round it should work as wanted.
Cmd: amx_specnorm
After using amx_spectate it is recommended to use amx_specnorm which will set your view back to normal. If not you could...have some major troubles.
CVARS:
Spectator_Speed = Default speed for people playing in spectator mode
Default = 500.0
Spectator_Health = Default health for people playing in spectator mode
Default = 100
Spectator_Armor = Default armor for people playing in spectator mode
default = 100
Spectator_Gravity = Default gravity for people playing in spectator mode
default = .5
To Come:
1. Parameter to allow others to go into spectator mode
2. A way to override the server default for speed, health etc. etc.
3. Hopefully a fix to the 2 apparent problems if I ever get a reply.
4. Other spectator options
5. Maybe, the availability of a third team all in spectator mode as so there can be three teams rather than one (maybe a vote or something similar)
6. Any other suggestions anyone has.
[Edit]
Whoops forgot about this:
Code:
Weapon Bytes:
CSW_P228 1
CSW_SCOUT 3
CSW_HEGRENADE 4
CSW_XM1014 5
CSW_C4 6
CSW_MAC10 7
CSW_AUG 8
CSW_SMOKEGRENADE 9
CSW_ELITE 10
CSW_FIVESEVEN 11
CSW_UMP45 12
CSW_SG550 13
CSW_GALI 14
CSW_GALIL 14
CSW_FAMAS 15
CSW_USP 16
CSW_GLOCK18 17
CSW_AWP 18
CSW_MP5NAVY 19
CSW_M249 20
CSW_M3 21
CSW_M4A1 22
CSW_TMP 23
CSW_G3SG1 24
CSW_FLASHBANG 25
CSW_DEAGLE 26
CSW_SG552 27
CSW_AK47 28
CSW_KNIFE 29
CSW_P90 30