Unlimited Stamina
by MrShadow · 2007-10-08 · 13 replies · 13981 views · 238 downloads
From the first post
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
The thread
All 14 posts from 6 people on Unlimited Stamina, kept as they were written.
Threads: 2
Joined: Oct 2007
!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
Threads: 103
Joined: May 2005
nothing major at all.. but instead of doing:n
dod_set_stamina(id,STAMINA_SET,0,100)nyou can do:ndod_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:)Threads: 12
Joined: Mar 2010
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}
Threads: 59
Joined: Jan 2007
Threads: 12
Joined: Mar 2010
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
Threads: 59
Joined: Jan 2007
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?
Threads: 12
Joined: Mar 2010
I followed your steps in that link you provided mernhttps://www.dodplugins.net/forums/showpost.php?p=14292&postcount=16rnrnand it worked perfectly.
Threads: 26
Joined: Nov 2005
Can you post the revised version?
Threads: 26
Joined: Nov 2005
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
Threads: 15
Joined: Mar 2007
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}rnThreads: 26
Joined: Nov 2005
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.rnrnrnrnHey SynrnrnHow you doing, hope all is well.rnrnThanks for the quick reply, i'll try it now.rnrnThanksrn#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
Threads: 26
Joined: Nov 2005
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
Threads: 15
Joined: Mar 2007
Doing good thanks lol, but busy as all hell. There is one, it's amx_stamina, set it to 1 to enable it.
Threads: 26
Joined: Nov 2005
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

