Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

Unlimited Stamina

by MrShadow · 2007-10-08 · 13 replies · 13981 views · 238 downloads

Read the thread (14 posts)

From the first post

!Unlimited Stamina!
rn
rnAlright this is basically not my plugin. I came up with the idea and tried to code it but was unsuccessful (since i have no coding knowledge or experience in amxx coding... or any other coding for that matter...except html and asp...but that doesn't count, ANYWAY), so Hell Pheonix told me what was wrong with it, and did up this code, so most of the credit should go to him. THANKS HELL PHEONIX!
rn
rnok so the commands:
rn
rndod_stamina 1 -gives everybody unlimited stamina after they respawn, you can add this to your amxx.cfg to give unlimited stamina to everyone when the map starts.
rn
rndod_stamina 0 -takes away their unlimited stamina after they die.
rn
rn
rnCredits:
rn
rnHell Pheonix
rnMr.Shadow (I probably shouldn't even be putting myself in here)
rn
rnI hope you enjoy this plugin. It's my first released, well technically it's Hell Pheonix's first release through me :P

Files

dod_unlimited_stamina.sma Plugin Source 1 KB 238 dl Download Compile

The thread

All 14 posts from 6 people on Unlimited Stamina, kept as they were written.

M MrShadow
started this thread
Posts: 3
Threads: 2
Joined: Oct 2007
10-08-2007, 03:21 PM #1

!Unlimited Stamina!rnrnAlright this is basically not my plugin. I came up with the idea and tried to code it but was unsuccessful (since i have no coding knowledge or experience in amxx coding... or any other coding for that matter...except html and asp...but that doesn't count, ANYWAY), so Hell Pheonix told me what was wrong with it, and did up this code, so most of the credit should go to him. THANKS HELL PHEONIX! rn rnok so the commands:rnrndod_stamina 1 -gives everybody unlimited stamina after they respawn, you can add this to your amxx.cfg to give unlimited stamina to everyone when the map starts.rnrndod_stamina 0 -takes away their unlimited stamina after they die.rnrnrnCredits:rnrnHell PheonixrnMr.Shadow (I probably shouldn't even be putting myself in here)rnrnI hope you enjoy this plugin. It's my first released, well technically it's Hell Pheonix's first release through me :P

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
10-08-2007, 04:06 PM #2

nothing major at all.. but instead of doing:n

dod_set_stamina(id,STAMINA_SET,0,100)
nyou can do:n
dod_set_stamina(id,STAMINA_RESET)
nnbut either way its the same thing so it doesnt really matter at all and not really worth uploading again or anything for such a minor thing at allnn:)

MOSdod
posted here
Posts: 74
Threads: 12
Joined: Mar 2010
04-05-2010, 06:16 PM #3

I did exactly what you have mentioned but still, Some players will Loose unlimited stamina and some have it. But if I restart the map Everyone has unlimited stamina but not for long. rnI would appreciate any help in fixing this so that ALL Players ALL the time will have Unlimted Stamina.rnrnThank you in advancernrnrnThis is what I have in the .sma filernrnpublic plugin_init() {rn register_plugin(PLUGIN, VERSION, AUTHOR)rn g_stamina = register_cvar("dod_stamina","0")rn register_event("ResetHUD","give_stamina","be")rn register_clcmd("fullupdate", "clcmd_fullupdate")rn}rn rnpublic give_stamina(id){rn if(get_pcvar_num(g_stamina) && !g_set[id]){rn dod_set_stamina(id,STAMINA_SET,100,100)rn g_set[id] = 1rn }else if (!get_pcvar_num(g_stamina) && g_set[id]){rn dod_set_stamina(id,STAMINA_RESET)rn g_set[id] = 0rn }rn return PLUGIN_HANDLEDrn}rn rnpublic clcmd_fullupdate() {rn return PLUGIN_HANDLEDrn}

Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
04-05-2010, 06:34 PM #4
MOSdod
posted here
Posts: 74
Threads: 12
Joined: Mar 2010
04-05-2010, 08:01 PM #5

Thanks Tank..Worked Perfectly... Just curious why it was removed? I saved it to my favorites for future backup. I hope it won't be gone by then.rnrnThanks alot again thank you thank you

Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
04-06-2010, 12:14 PM #6

I posted it there and it was never removed. So it should remain there. May I ask what you changed so perhaps I can alter the plugin for public use?

MOSdod
posted here
Posts: 74
Threads: 12
Joined: Mar 2010
04-06-2010, 02:43 PM #7

I followed your steps in that link you provided mernhttps://www.dodplugins.net/forums/showpost.php?p=14292&postcount=16rnrnand it worked perfectly.

Ba5ic
posted here
Posts: 181
Threads: 26
Joined: Nov 2005
01-10-2011, 01:32 PM #8

Can you post the revised version?

Ba5ic
posted here
Posts: 181
Threads: 26
Joined: Nov 2005
12-01-2012, 05:47 AM #9
I did exactly what you have mentioned but still, Some players will Loose unlimited stamina and some have it. But if I restart the map Everyone has unlimited stamina but not for long. rnI would appreciate any help in fixing this so that ALL Players ALL the time will have Unlimted Stamina.rnrnThank you in advancernrnrnThis is what I have in the .sma filernrnpublic plugin_init() {rn register_plugin(PLUGIN, VERSION, AUTHOR)rn g_stamina = register_cvar("dod_stamina","0")rn register_event("ResetHUD","give_stamina","be")rn register_clcmd("fullupdate", "clcmd_fullupdate")rn}rn rnpublic give_stamina(id){rn if(get_pcvar_num(g_stamina) && !g_set[id]){rn dod_set_stamina(id,STAMINA_SET,100,100)rn g_set[id] = 1rn }else if (!get_pcvar_num(g_stamina) && g_set[id]){rn dod_set_stamina(id,STAMINA_RESET)rn g_set[id] = 0rn }rn return PLUGIN_HANDLEDrn}rn rnpublic clcmd_fullupdate() {rn return PLUGIN_HANDLEDrn}
rnrnHello AllrnrnBeen a long time, just got back into 1.3, got me a server again :)rnrnI've installed this pluggin, and having the same problem as MOSdod, as above, losing the stamina through a game. Looks like he figured it out without posting an updated .sma.rnrnThis is in my compiled .sma :-rnrn#include <amxmodx>rn#include <amxmisc>rn#include <dodfun>rn rn#define PLUGIN "DoD Unlimited Stamina"rn#define VERSION "1.0"rn#define AUTHOR "Mr.Shadow"rnnew g_staminarnnew g_set[32]rn rnpublic plugin_init() {rn register_plugin(PLUGIN, VERSION, AUTHOR)rn g_stamina = register_cvar("dod_stamina","0")rn register_event("ResetHUD","give_stamina","be")rn register_clcmd("fullupdate", "clcmd_fullupdate")rn}rn rnpublic give_stamina(id){rn if(get_pcvar_num(g_stamina) && !g_set[id]){rn dod_set_stamina(id,STAMINA_SET,100,100)rn g_set[id] = 1rn }else if (!get_pcvar_num(g_stamina) && g_set[id]){rn dod_set_stamina(id,STAMINA_SET,0,100)rn g_set[id] = 0rn }rn return PLUGIN_HANDLEDrn}rn rnpublic clcmd_fullupdate() {rn return PLUGIN_HANDLEDrn} rnrnAs i said it works, but i and players do lose unlimited stamina periodically.rnrnThanks All

dodsynthetic
posted here
Posts: 277
Threads: 15
Joined: Mar 2007
12-01-2012, 03:05 PM #10

Heh, I was given this exact plugin with a modification request the other day. I didn't like the method used since it's doing naughty things so I did it differently.rnrn

rn#include <amxmodx>rn#include <fakemeta>rnrn// =================================================================================================rn// Declare global variables and valuesrn// =================================================================================================rnnew p_enable_staminarnrn// =================================================================================================rn// Plugin Initrn// =================================================================================================rnpublic plugin_init() {rn	register_plugin("Stamina","1.0","Syn")rn	p_enable_stamina = register_cvar("amx_stamina","0")rn	register_forward(FM_CmdStart,"func_client_commands",0)rn}rnrn// =================================================================================================rn// Hook run and set staminarn// =================================================================================================rnpublic func_client_commands(id,uc_handle,seed) {rn	if(get_uc(uc_handle,UC_Buttons) & IN_RUN && get_pcvar_num(p_enable_stamina))rn	{rn		set_pev(id,pev_fuser4,100.0)rn	}rn	return PLUGIN_CONTINUErn}rn
Ba5ic
posted here
Posts: 181
Threads: 26
Joined: Nov 2005
12-01-2012, 03:24 PM #11
Heh, I was given this exact plugin with a modification request the other day. I didn't like the method used since it's doing naughty things so I did it differently.rnrn
rn#include <amxmodx>rn#include <fakemeta>rnrn// =================================================================================================rn// Declare global variables and valuesrn// =================================================================================================rnnew p_enable_staminarnrn// =================================================================================================rn// Plugin Initrn// =================================================================================================rnpublic plugin_init() {rn	register_plugin("Stamina","1.0","Syn")rn	p_enable_stamina = register_cvar("amx_stamina","0")rn	register_forward(FM_CmdStart,"func_client_commands",0)rn}rnrn// =================================================================================================rn// Hook run and set staminarn// =================================================================================================rnpublic func_client_commands(id,uc_handle,seed) {rn	if(get_uc(uc_handle,UC_Buttons) & IN_RUN && get_pcvar_num(p_enable_stamina))rn	{rn		set_pev(id,pev_fuser4,100.0)rn	}rn	return PLUGIN_CONTINUErn}rn
rnrnHey SynrnrnHow you doing, hope all is well.rnrnThanks for the quick reply, i'll try it now.rnrnThanks

Ba5ic
posted here
Posts: 181
Threads: 26
Joined: Nov 2005
12-01-2012, 03:34 PM #12

No, not working :(rnrnCopied your info, compiled ok using compiler here.rnrnadded to plugins.inirnrnre-started server and no unlimited stamina.rnrnI am right, there is no cvar for the amxx.cfg?.rnrnThanks buddy

dodsynthetic
posted here
Posts: 277
Threads: 15
Joined: Mar 2007
12-01-2012, 04:35 PM #13

Doing good thanks lol, but busy as all hell. There is one, it's amx_stamina, set it to 1 to enable it.

Ba5ic
posted here
Posts: 181
Threads: 26
Joined: Nov 2005
12-01-2012, 04:49 PM #14
Doing good thanks lol, but busy as all hell. There is one, it's amx_stamina, set it to 1 to enable it.
rnrnPerfect!!!, Hope real lifes eases for you over the holiday period.rnrnxD

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC