This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Awp/Auto blanks


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
monk1986
Member
Join Date: Oct 2007
Old 10-18-2007 , 20:02   Awp/Auto blanks
Reply With Quote #1

Sytfu no awp.

This plugin is to help further restrict the awp from player / admin use.
What it does is if a player switch to an awp it change the hitzones for that player so that he can not use the awp to shoot some one.

Then if he switch's back to a pistol / a diffrent primary weapon like for example the m4a1 it then changes the hitzones back to normal to allow it to shoot.

There's also a cvar that can be set to turn this on / off.
to disable type: amx_awp_blanks 0
to enable type: amx_awp_blanks 1
Attached Files
File Type: sma Get Plugin or Get Source (sytfunoawp.sma - 783 views - 755 Bytes)

Last edited by monk1986; 10-19-2007 at 18:07. Reason: Fixed the issue's that was stated.
monk1986 is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 10-18-2007 , 20:15   Re: Awp/Auto blanks
Reply With Quote #2

1] <core> and <cstrike> are not needed.
2] You do not need return PLUGIN_CONTINUE in plugin_init().
3] Change_Wpn should return a value (this will not be approved if there is a warning, which there is)
4] Whats the menu for?
5] Would be better to use equali incase some servers happen to change the map with different cased letters.
6] You don't need to use DEFINES if you already put the strings into register_plugin().
7] The .zip is unnecessary.
8] Don't keep getting the map name in the CurWeapon event, it is a waste having to check it every single time. Check for the map elsewhere.
9] The simpler the code, the better.
10] Better description.
__________________

Last edited by M249-M4A1; 10-18-2007 at 20:22.
M249-M4A1 is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 10-18-2007 , 20:19   Re: Awp/Auto blanks
Reply With Quote #3

1 includes doesnt really matter that much
2 use cvar
3 does this work
4 dont retrieve weapon 3 times, store it in a variable
5 just use read_data fired from curweapon instead of getting player weapon
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Jheshka
Senior Member
Join Date: Dec 2005
Old 10-18-2007 , 22:31   Re: Awp/Auto blanks
Reply With Quote #4

Quote:
Originally Posted by M249-M4A1 View Post
1] <core> and <cstrike> are not needed.
2] You do not need return PLUGIN_CONTINUE in plugin_init().
3] Change_Wpn should return a value (this will not be approved if there is a warning, which there is)
4] Whats the menu for?
5] Would be better to use equali incase some servers happen to change the map with different cased letters.
6] You don't need to use DEFINES if you already put the strings into register_plugin().
7] The .zip is unnecessary.
8] Don't keep getting the map name in the CurWeapon event, it is a waste having to check it every single time. Check for the map elsewhere.
9] The simpler the code, the better.
10] Better description.
Nice list...
__________________
James
Jheshka is offline
monk1986
Member
Join Date: Oct 2007
Old 10-19-2007 , 01:31   Re: Awp/Auto blanks
Reply With Quote #5

Well im a beginner so guess thats to be expected ^^.
Ill get to work on fixing the things you all have listed.

Yes the plugin work's i have tested it on my clan server.
monk1986 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-19-2007 , 02:00   Re: Awp/Auto blanks
Reply With Quote #6

Again, you should not release a plugin if it's your very first plugin and that you're starting to learn.

You should post firstly in scripting section to learn more and to get some help to improve your plugin.
__________________
Arkshine is offline
monk1986
Member
Join Date: Oct 2007
Old 10-19-2007 , 04:02   Re: Awp/Auto blanks
Reply With Quote #7

Edited with new plugin same plugin just everything fixed
monk1986 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-19-2007 , 05:17   Re: Awp/Auto blanks
Reply With Quote #8

Check the mapname in plugin_init, then if it's an awp map, pause the plugin.
Actually, your plugin will never be paused.

http://www.amxmodx.org/funcwiki.php?go=func&id=223
ConnorMcLeod is offline
monk1986
Member
Join Date: Oct 2007
Old 10-19-2007 , 08:08   Re: Awp/Auto blanks
Reply With Quote #9

Ok updated it again now in plugin_init it will pause the plugin if map name has awp_
monk1986 is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 10-19-2007 , 13:10   Re: Awp/Auto blanks
Reply With Quote #10

Better. Remove the register_event("HLTV"... blah blah line. It isn't used.

PS: You still don't have to upload the .amxx file. Once you upload the .sma, the forum automatically generates that nice "Get Plugin" thing. In other words, only upload the .sma file
__________________

Last edited by M249-M4A1; 10-19-2007 at 15:22.
M249-M4A1 is offline
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 02:53.


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