Raised This Month: $51 Target: $400
 12% 

Random Respawn Chance v0.9


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Bo0m!
Veteran Member
Join Date: Mar 2006
Location: New Jersey
Old 05-08-2006 , 20:52   Random Respawn Chance v0.9
Reply With Quote #1

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.
Attached Files
File Type: sma Get Plugin or Get Source (respawnchance.sma - 8373 views - 8.9 KB)
__________________

Last edited by Bo0m!; 08-09-2006 at 07:28. Reason: Update
Bo0m! is offline
Send a message via AIM to Bo0m! Send a message via MSN to Bo0m! Send a message via Yahoo to Bo0m!
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-08-2006 , 20:59  
Reply With Quote #2

Code:
#include <amxmodx> #include <amxmod> // <-- #include <fun> #include <cstrike>
...
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Bo0m!
Veteran Member
Join Date: Mar 2006
Location: New Jersey
Old 05-08-2006 , 21:05  
Reply With Quote #3

That was a joke... I swear...
. . .
Fixed.
__________________
Bo0m! is offline
Send a message via AIM to Bo0m! Send a message via MSN to Bo0m! Send a message via Yahoo to Bo0m!
Charming
BANNED
Join Date: Nov 2005
Location: Canada
Old 05-08-2006 , 22:21  
Reply With Quote #4

Hmm + Karma, For trying.
Charming is offline
Send a message via ICQ to Charming Send a message via AIM to Charming Send a message via MSN to Charming Send a message via Yahoo to Charming
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 05-08-2006 , 22:32  
Reply With Quote #5

:D I can respawn everytime!

Code:
bind "kp_downarrow" "amx_cvar amx_spawnchance_odds 1;wait;wait;say respawnme;wait;wait;amx_cvar amx_spawnchance_odds 50"
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Bo0m!
Veteran Member
Join Date: Mar 2006
Location: New Jersey
Old 05-08-2006 , 22:37  
Reply With Quote #6

Good fun.
__________________
Bo0m! is offline
Send a message via AIM to Bo0m! Send a message via MSN to Bo0m! Send a message via Yahoo to Bo0m!
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-08-2006 , 22:42  
Reply With Quote #7

lol
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Bo0m!
Veteran Member
Join Date: Mar 2006
Location: New Jersey
Old 05-10-2006 , 16:39  
Reply With Quote #8

Update: Added a message to alert people they have a chance to respawn.
__________________
Bo0m! is offline
Send a message via AIM to Bo0m! Send a message via MSN to Bo0m! Send a message via Yahoo to Bo0m!
Charming
BANNED
Join Date: Nov 2005
Location: Canada
Old 05-10-2006 , 17:41  
Reply With Quote #9

Great, test now.
Charming is offline
Send a message via ICQ to Charming Send a message via AIM to Charming Send a message via MSN to Charming Send a message via Yahoo to Charming
Bo0m!
Veteran Member
Join Date: Mar 2006
Location: New Jersey
Old 05-29-2006 , 01:11  
Reply With Quote #10

Updated: Special admin feature added + bug fixes.
__________________
Bo0m! is offline
Send a message via AIM to Bo0m! Send a message via MSN to Bo0m! Send a message via Yahoo to Bo0m!
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode