Raised This Month: $110 Target: $400
 27% 

God Mode On Reload


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
Balck
Senior Member
Join Date: Apr 2013
Location: Kosova-Mitrovica
Old 07-31-2013 , 20:12   God Mode On Reload
Reply With Quote #1

*Description
This plugin gives GODMODE to a player when he is reloading his weapon


*CVAR
* amx_godmodeOR 0/1 - Disable/Enable plugin. <default: 1>
* amx_reloadglow 0/1 - Disable/Enable green glow on reload. <default: 1>


*CREDITS
A very big thanks to EpicMonkey for the big help
Attached Files
File Type: sma Get Plugin or Get Source (godmode_on_reload.sma - 1384 views - 2.9 KB)
__________________

Last edited by Balck; 09-19-2013 at 07:21.
Balck is offline
Mauricio Frb
Member
Join Date: Jul 2013
Old 07-31-2013 , 20:30   Re: God Mode On Reload
Reply With Quote #2

Suggestion

Code:
public client_PreThink(id)
{
	if(get_pcvar_num(gmreload) == 0)
	{
		return PLUGIN_CONTINUE
	}

	if (!is_user_connected(id)) 
	{
		return PLUGIN_CONTINUE
	}

	if(get_user_button(id) & IN_RELOAD)
	{
		startgodmode(id)
	}
	return PLUGIN_CONTINUE
}

->>

public client_PreThink(id)
{
	if(!get_pcvar_num(gmreload) || !is_user_connected(id))
		return PLUGIN_HANDLED

	if(get_user_button(id) & IN_RELOAD)
		startgodmode(id)
	
	return PLUGIN_CONTINUE
}
Mauricio Frb is offline
Balck
Senior Member
Join Date: Apr 2013
Location: Kosova-Mitrovica
Old 07-31-2013 , 20:42   Re: God Mode On Reload
Reply With Quote #3

Quote:
Originally Posted by Mauricio Frb View Post
Suggestion

Code:
public client_PreThink(id)
{
	if(get_pcvar_num(gmreload) == 0)
	{
		return PLUGIN_CONTINUE
	}

	if (!is_user_connected(id)) 
	{
		return PLUGIN_CONTINUE
	}

	if(get_user_button(id) & IN_RELOAD)
	{
		startgodmode(id)
	}
	return PLUGIN_CONTINUE
}

->>

public client_PreThink(id)
{
	if(!get_pcvar_num(gmreload) || !is_user_connected(id))
		return PLUGIN_HANDLED

	if(get_user_button(id) & IN_RELOAD)
		startgodmode(id)
	
	return PLUGIN_CONTINUE
}
It is the same but ok :S
__________________
Balck is offline
Mauricio Frb
Member
Join Date: Jul 2013
Old 07-31-2013 , 20:48   Re: God Mode On Reload
Reply With Quote #4

No, it's more oprimized. (I think)
Mauricio Frb is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Portugal
Old 07-31-2013 , 20:49   Re: God Mode On Reload
Reply With Quote #5

Well, you could reduce the amount of lines very, but really very much.
btw i dont think this plugin gonna be approved even if the code be good.
__________________
Jhob94 is offline
Balck
Senior Member
Join Date: Apr 2013
Location: Kosova-Mitrovica
Old 07-31-2013 , 20:54   Re: God Mode On Reload
Reply With Quote #6

Quote:
Originally Posted by Jhob94 View Post
Well, you could reduce the amount of lines very, but really very much.
btw i dont think this plugin gonna be approved even if the code be good.
i know it is not so good coded but :S it's working well
__________________
Balck is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Portugal
Old 07-31-2013 , 21:01   Re: God Mode On Reload
Reply With Quote #7

Iam just saying to you work on it.
Bad coded? Yes. But you can improve and optimize it ;)
Btw the task time is really correct? Because it wouldnt be much fun to a guy that has godmode shoot me

Edit:
Also add cvar to blind while reload.
Or if player wants reload with godmode, needs get blinded, because while reloading he can take the crosshair in enemie to kill him. Also if i see lot of enemies, i can simply reload and run away what isnt fair, so with blind i think it would be fine
__________________

Last edited by Jhob94; 07-31-2013 at 21:03.
Jhob94 is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 07-31-2013 , 21:12   Re: God Mode On Reload
Reply With Quote #8

Very nice plugin! Thanks for sharing such a beauty plugin.
__________________
Accepting paid work for clans and communities. !Plugins & Models!
Don't hesitate to contact me.
bibu is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-31-2013 , 22:33   Re: God Mode On Reload
Reply With Quote #9

Quote:
Originally Posted by Mauricio Frb View Post
No, it's more oprimized. (I think)
Actually, it is worse. Don't return PLUGIN_HANDLED in events that you don't want to block
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-01-2013 , 06:33   Re: God Mode On Reload
Reply With Quote #10

Code is redundant, make a table with weapons maxclip and another with weapons reload time, so you don't need this switch statement anymore.
Also, i think reload time you have put are not accurate, where have you found them ?

Last, i'm pretty sure your reload detection method can return false positive, depending on weapon state players could abuse of it.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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 19:41.


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