Random Respawn Chance
With this plugin you have a random chance to respawn when dead by saying one of the following:
respawn me
respawnme
revive me
reviveme
/revive
/reviveme
Cvars:
spawnchance_on <1/0> Enables/Disables Plugin.
spawnchance_odds <2-1000> Odds of respawning.
Example: If you want a 1 in 50 chance to respawn, set spawnchance_odds to 50. The default is a 1 in 10 chance you will respawn.
spawnchance_wait <seconds> Amount of time before people can try to respawn again. Default is 150 seconds.
spawnchance_msg <1/0> Enables/Disables showing a message to alert players they can respawn.
spawnchance_msgtime <seconds> Amount of time between the messages being displayed. Default is 75 seconds.
spawnchance_adminbonus <0/1/2> Special admin bonus. Default 0
0= No special admin bonuses. 1= Admins have no wait time. 2= Admins will always win a respawn.
Code:
Changelog:
v0.9 - Knocked off the 'amx_' prefix on cvars (They're long enough already)
- Changed amx_spawnchance cvar to spawnchance_on
- Fixed problem where you'd lose your chance if respawned when the round's over (Didn't test it. :P)
v0.8 - Added special feature for admins by request
- Fixed bug with wait cvar
v0.7 - Fixed bug with message cvar
- Changed default message time cvar
- Removed /respawnme
v0.6 - Added a cvar to choose time between respawn message
v0.5 - Added a message to notify players about the respawn chance
- Added cvar amx_spawnchance_msg to enable/disable message
- Added reviveme and revive me
v0.4 - Minor bug fix
- Changed how the odds reset if less than 2 or greater than 1000
- Changed defaulting if too low/high to changing to least/most
v0.3 - Made it to reset odds to default if less than 2 or greater than 1000
v0.2 - Fixed bug where spectators could respawn
- Decreased default wait time and increased default winning odds
- Added /revive and /reviveme
- Gave player a knife on respawn due to certain map issues
v0.1 - Initial Release
Bugs:
None known of so far.
Notes:
The coding is very simple.
This is my first attempt at making a plugin.
Any ideas or suggestions are welcome.
See source for more info.