AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.60 (https://forums.alliedmods.net/showthread.php?t=51732)

KWo 02-23-2007 10:04

Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.60
 
1 Attachment(s)
/* AMX Mod X script.
*
* Drop AWP with Team Limit and Win limit v1.6 (CS & CS:CZ)
* By SuicideDog & MattOG/DaSoul & KWo
*
* Modded orignal from JustinHoMi
*
*Up-To Version 0.5: SuicideDog & JustinHoMi
*******************************************
*
*
* VERSION: 1.0: MattOG
**********************
*
* Combined all 3 plugins (g3sg1/sg550/awp limit) into one.
* Added seperate commands to control Auto's and Awps. (different limits/rounds)
* Fixed bug with old-style menu's still being able to buy guns. (Credit to bAnTAi, I used his Y.A.S.C. plugin to help with the code).
*
* I didn't make it stop bots:
* 1. All bots come with built in weapon restrictions.
* 2. Bots tend not to be AWP whores ;)
*
*
* VERSION 1.1: MattOG
*********************
* Changed Maxawps/autos and winspreads to cvars to enable on-the-fly changing, and to allow changes to be set in server/amxx/map configs.
*
*
* VERSION: 1.2: MattOG
**********************
*
* Minor bug fix where old style menu's couldn't buy at all. (Thanks to Olie for pointing it out).
*
*
* VERSION: 1.3: SuicideDog/DaSoul
**********************
*
* Added DaSoul's code to allow it to work with PTB correctly
*
* VERSION: 1.4: KWo
**********************
*
* Little bug fixes causing Run Time Errors etc...
* Blocking pickup limited weapon
* Bots are affected by this plugin, too but it doesn't prevent them from buying (they drop limited weapons after buying)
* Optimized usage of cvars by using pcvar functions.
*
**********************
*
* VERSION: 1.5: KWo
*
* Added support for team balancing (if someone has an awp or auto sniper and get switched alive to the opposite team)
*
**********************
*
* VERSION: 1.52: KWo
*
* Added min_players setting (cvar) to allow awps/autos if at least min_players amount in each team is reached
*
**********************
*
* VERSION: 1.53: KWo
*
* Fixed bug with not counting properly awps and autos when droping weapon by engine (i.e. while buying a new weapon)
* Fixed bug with displaying unnecessary message about awps/autos limitation
* Fixed bug with player blocking from pickup awp/autos when only one of them was really limited by cvars
*
**********************
*
* VERSION: 1.60: KWo
*
* Many functions re-written to fix the stack error problem
*
**********************
* CVARS:
***********
*
* max_awps <xx> - Maximum Awps Allowed
* max_autos <xx> - Maximum Autos Allowed
* winspread_awp <xx> - When This Many Rounds Ahead, No Awps Allowed
* winspread_auto <xx> - When This Many Rounds Ahead, No Autos Allowed
* min_players <xx> - It says how many players has to be at least in one team to allow awp/autos (if they are restricted by awplimit 1 or autolimit 1).
* Example:
* min_players 5
* It means You have to be at least 5:5 to allow awp's/auto's (if they are restricted by awplimit 1 or autolimit 1).
* checkrebuy <1/0> - 1 = Prevent Rebuy Command, 0 = Don't
*
* TIPS:
* To ALWAYS restrict to X number of awps/autos set winspread_awp/auto to 0 and max_awps/autos to however many awps/autos
* To ONLY restrict after X number of rounds ahead, set max_awps/autos to 20 and winspread_awp/autos to however many rounds
*
*
*/

This topic is the continuation of no longer supported plugin by KiN | SuicideDog. The old topic You can find here.
I've fixed some bugs it had in the 1.3 version and I've added some little features (You can read about them in the comment for 1.4 version).
Some function has been rewritten to better work and don't give wrong messages about impossibility to use the limited weapon if there is no reason for such messages.
[EDIT]
There was above 330+1065+2785+6800 downloads before I updated the topic to the version 1.60
[/EDIT]

Inogood 02-23-2007 11:52

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
yyaaa:) me first :D Nice job !!!

Skissors 02-23-2007 12:10

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
for the bots, they sometimes get stuck above a weapon they want to switch to, and will not shoot at you sometimes. I had encountered this same problem before in gungame when i restricted weapon pickup of non-same level weapons
Bots: POD-Bot

Skissors 02-23-2007 12:11

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
a solution to this might be to delete the weapon_armory for the awp/autos when dropped

KWo 02-23-2007 12:40

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Quote:

Originally Posted by Skissors (Post 444412)
for the bots, they sometimes get stuck above a weapon they want to switch to, and will not shoot at you sometimes. I had encountered this same problem before in gungame when i restricted weapon pickup of non-same level weapons
Bots: POD-Bot

If You are using V3B17 there shouldn't be the problem with bots not shooting (it was somewhere in V3B16e-h versions).
About bots trying pickup the weapon - they don't know they cannot pickup that weapon, but after 5seconds they unstuck - they mark the entity as "un-pickupable" and they don't try to pickup it anymore.
I don't want to change the properties of dropped weapon, because if another owner of limited weapon drops it or get killed - You should be able to pickup that dropped weapon again (or if the admin will change in the game the limit per team).

Skissors 02-23-2007 13:08

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
fair enough

AllMassive 02-24-2007 12:03

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Nice that this Plugin has been fixed :up:


EDiT:
Can you add smth like 'vote_awp' - so that the Players can disabled AWP for the whole map with a In-Game-Vote ?

KWo 02-24-2007 17:46

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Quote:

Originally Posted by Aiwa (Post 444985)
Found a bug.. Should be easily fixed.

I just had 2 people on one team, and amx_awps set to 1.

One person bought an awp, died and dropped the awp. My teammate could not pick up the awp.

Also, if one person were to buy an awp, and drop it to his teammate, they can pick up the awp, but they also get a message that says "Too many people on your team have AWP'S". Like I said, it does not restrict you from picking up the awp, but an invalid message.

Other than that.. It looks great man. I was working on recoding it, but your code is far cleaner than mine. :P

That teamnate got normally killed by an enemy or he falled down from some high building or something? HL sometimes doesn't sent death messages, so I need to know what was happened for Your teamnate.

Aiwa 02-24-2007 20:07

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Got killed by a teammate nade.

KWo 02-25-2007 04:30

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
The bug is also when he gets killed by a shoot from any gun or only if he gets killed by a nade/bomb?

AllMassive 02-27-2007 09:42

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
I got this error and enabled 'debug' - but until now i didnt get it a second time

Code:

L 02/26/2007 - 01:38:07: Start of error session.
L 02/26/2007 - 01:38:07: Info (map "de_westwood") (logfile "error_022607.log")
L 02/26/2007 - 01:38:07: [AMXX] Run time error 3 (plugin "sniperlimit1.4.amxx") - debug not enabled!
L 02/26/2007 - 01:38:07: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

I will repost the exact error with enabled Debug.

KWo 02-27-2007 15:26

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
OK. Are You using any AFK plugin?

AllMassive 02-28-2007 08:27

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Here's the debugged error:

Code:

L 02/28/2007 - 04:19:02: Start of error session.
L 02/28/2007 - 04:19:02: Info (map "de_aztec") (logfile "error_022807.log")
L 02/28/2007 - 04:19:02: [AMXX] Displaying debug trace (plugin "sniperlimit1.4.amxx")
L 02/28/2007 - 04:19:02: [AMXX] Run time error 4: index out of bounds
L 02/28/2007 - 04:19:02: [AMXX]    [0] sniperlimit1.4.sma::cmdawp (line 155)

I use this AFK-Plugin: http://forums.alliedmods.net/showthread.php?p=126963
Bombdrop: http://forums.alliedmods.net/showthread.php?p=33107

KWo 02-28-2007 15:01

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
1 Attachment(s)
Please try if this version solves Your problem. You may need to test it during few days (except the situation the error will happen instantly again :) ).

rjeezy 02-28-2007 17:14

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
im soo noob.. i cant get it to work.. =/

i uploaded it in the amxx plugins folder... added it in the plugins.ini ... that didnt work.. and uploaded the.sma folder in the scripts folder... still dont work..

can i get a lil help?

edit...
nvm... im reading over how to install the plugin.. if i still have trouble, ill post again

rjeezy 02-28-2007 19:38

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
nope still cant get it to work at all... and i read over this http://forums.alliedmods.net/showthread.php?t=23369

got any advice on where to start looking?

AllMassive 02-28-2007 22:48

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
It's enabled from now own - i'll post back.

KWo 03-01-2007 02:18

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Quote:

Originally Posted by rjeezy (Post 446869)
nope still cant get it to work at all... and i read over this http://forums.alliedmods.net/showthread.php?t=23369

got any advice on where to start looking?

How about Your amxmodx\configs\plugins.ini? Did You add this line:
sniperlimit.amxx
at the bottom of the file?
Write in the console:
meta list
amxx plugins
and post the output here. Make sure You are using the latest AMX X version (currently 1.76c).

rjeezy 03-01-2007 09:07

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
] amxx plugins
AMX Mod X 1.75a
Authors: David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko, Felix "SniperBeamer" Geyer
Authors: Jonny "Got His Gun" Bergstrom, Lukasz "SidLuke" Wlasinski
Authors: Christian "Basic-Master" Hammacher, Borja "faluco" Ferrer
Compiled: Jul 4 2006, 14:28:30
URL:http://www.amxmodx.org/
Core mode: JIT

] meta list
Currently running plugins:
[ 1] AMX Mod X, v1.75a, Jul 4 2006, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 2] WebMod, v0.48, 2005/02/27, by dJeyL, see http://djeyl.net/w
[ 3] STATSME, v2.8.3, 2004/06/16, by UA StatsMe Team, see www.unitedadmins.com/statsme.php
[ 4] Fun, v1.75, Jul 4 2006, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 5] Engine, v1.75, Jul 4 2006, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 6] FakeMeta, v1.75, Jul 4 2006, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 7] MySQL, v1.75, Jul 4 2006, by AMX Mod X Dev Team, see http://www.amxmodx.org/
[ 8] CStrike, v1.75, Jun 28 2006, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 9] CSX, v1.75, Jun 28 2006, by AMX Mod X Dev Team, see http://www.amxmodx.org/
9 plugins
Unknown command: meta

im guessin i need to update amxx. And yes i did add the line

KWo 03-01-2007 15:40

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
You didn't show me the output fot the command "amxx plugins".
There is no reason to sue old Statsme (last updated in 2004) if You can use stats they are in AMX X. You just need to enable them by amx_statscfgmenu.

rjeezy 03-01-2007 22:20

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
forgive me for my ignorance.. but how do i get the output?

KWo 03-02-2007 02:22

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Output of the command is the result of it You can see on the screen...
If "amxx plugins" doesn't work for You use amx_plugins (but it doesn't work correctly on listenserver - use it only on dedicated server).

rjeezy 03-02-2007 13:32

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
amx_plugins is what worked for me then


] amx_plugins
Currently loaded plugins:
name version author file status
Admin Base (SQL) 1.75 AMXX Dev Team admin_sql.amxx running
Admin Base 1.75 AMXX Dev Team admin.amxx running
AMXBans 4.3 YoMama/Lux & lan amxbans.amxx running
Admin Commands 1.75 AMXX Dev Team admincmd.amxx running
Admin Help 1.75 AMXX Dev Team adminhelp.amxx running
Slots Reservation 1.75 AMXX Dev Team adminslots.amxx running
Multi-Lingual Sys 1.75 AMXX Dev Team multilingual.am running
Menus Front-End 1.75 AMXX Dev Team menufront.amxx running
Commands Menu 1.75 AMXX Dev Team cmdmenu.amxx running
Players Menu 1.75 AMXX Dev Team plmenu.amxx running
Teleport Menu 1.75 AMXX Dev Team telemenu.amxx running
Maps Menu 1.75 AMXX Dev Team mapsmenu.amxx running
Admin Chat 1.75 AMXX Dev Team adminchat.amxx running
Anti Flood 1.75 AMXX Dev Team antiflood.amxx running
Scrolling Message 1.75 AMXX Dev Team scrollmsg.amxx running
Info. Messages 1.75 AMXX Dev Team imessage.amxx running
Admin Votes 1.75 AMXX Dev Team adminvote.amxx running
NextMap 1.75 AMXX Dev Team nextmap.amxx running
TimeLeft 1.75 AMXX Dev Team timeleft.amxx running
Pause Plugins 1.75 AMXX Dev Team pausecfg.amxx running
Stats Configurati 1.75 AMXX Dev Team statscfg.amxx stopped
Restrict Weapons 1.75 AMXX Dev Team restmenu.amxx running
StatsX 1.75 AMXX Dev Team statsx.amxx running
CS Misc. Stats 1.75 AMXX Dev Team miscstats.amxx running
CS Stats Logging 1.75 AMXX Dev Team stats_logging.a running
UAIO (Admin Menu) 1.50 xeroblood/$uicid uaio_admin.amxx running
Admin Spectator E 1.3 KoST admin_spec_esp. running
AWP/AUTO Limit (T 1.4 SuicideDog/

and yes i got it working despite not having an up to date version of amx.. thx tho.. i should probably upgrade anyway

but on the other hand like u said about amx_statscfgmenu .. that, i cant get to work.. says its an unknown command. And why it says stopped.. i have no idea. I looked on the plugins and i have it activated so i dunno

KWo 03-02-2007 15:36

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Quote:

Originally Posted by rjeezy (Post 447650)
but on the other hand like u said about amx_statscfgmenu .. that, i cant get to work.. says its an unknown command. And why it says stopped.. i have no idea. I looked on the plugins and i have it activated so i dunno

I believe You accidently stopped the plugin statscfg.amxx from Plugins menu.
Find in Your amxmodx\configs folder the file called pausecfg.ini and check the contents of it. Maybe You need to whole delete it. Anyway - upgrade Your AMX X. The questions related to Your default plugins You should've ask in Support forum instead spamming my topic :P

mo0n 03-05-2007 08:13

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
hi cool plugin

um on a server with like 12 people 6v6 what do u think i shud make the max awps as? alot of ppl complain on my serv that ppl use awps and i get mad too but well awps are a part of the game so gotta deal with it.. =X

im not sure whats too much or too less or just right?

KWo 03-05-2007 09:17

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
As I know the people are using 1, maximum 2 awps per team, but maybe wait for some server owners/admins advices.

mo0n 03-05-2007 09:47

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
wait but isnt the cmd max_awps mean the total amount of awps allowed on the map for BOTH ct and t? is there a way to make it 2 per team ct and t?

and checkrebuy is set at "1" i checked, but i can still rebuy my weapons?

Aiwa 03-05-2007 11:42

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
max_awps is how many each team can use when that team is within the bounds of winspread_awp

i.e. max_awps 2 would allows 2 T's and 2 CT's to awp per round. Provided the the winning team isn't winning by more than winspread_awp.

Also, I'm getting that same error as massive. I'll try the that update you put up. I'll post back.

I'm curious. Do know know if there are any conflicts between this and UAIO, or amx_adminmodels?

I'll look when I get home, but I think i'm having a problem with the cs_get_user_team function not working properly. (CS:CZ Server) Is there a module I need to check to make sure this will function?

KWo 03-06-2007 02:56

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Quote:

Originally Posted by mo0n (Post 448935)
wait but isnt the cmd max_awps mean the total amount of awps allowed on the map for BOTH ct and t? is there a way to make it 2 per team ct and t?

and checkrebuy is set at "1" i checked, but i can still rebuy my weapons?

Can You send me as private message that script You are using for rebuy (with all config and the info how do You use it and so) to let me reproduce it on my PC? I think I know where the problem is - I just need to make the same what was done with default restmenu.sma (but to see if it works I need Your script). Is better to send it me on priva, because otherwise some people can see it here and then they will use it on Your servers as long I'll not fix this in the sniperlimit plugin.

AllMassive 03-06-2007 13:02

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Quote:

Originally Posted by KWo (Post 446773)
Please try if this version solves Your problem. You may need to test it during few days (except the situation the error will happen instantly again :) ).

I got this error with your fixed Version:

Code:

L 03/05/2007 - 22:59:58: Start of error session.
L 03/05/2007 - 22:59:58: Info (map "de_survivor") (logfile "error_030507.log")
L 03/05/2007 - 22:59:58: [AMXX] Displaying debug trace (plugin "sniperlimit1.4b.amxx")
L 03/05/2007 - 22:59:58: [AMXX] Run time error 3: stack error


KWo 03-07-2007 02:37

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Well - stack error doesn't mean automatically it's this plugin is causing it (it just says where the program is interrupted because of the problem with the stack. I would suggest You try again that fixed version only with deafult plugins (disable all custom plugins). If during fw days the error will appear again - then it may mean the problem is really in this plugin (which I doubt for that kind of error You've got). If during few days the error will not appear - You can try to add about 3 of Your most trustable and important plugins. Then test it during few days until You are sure it's OK or the error appears again. Do so until You narrow the plugin which collides with sniperlimit.sma
I know - it will take You maybe 2 weeks or so - but with that kind of error (which says nothing) I cannot help better right now. :(

AllMassive 03-07-2007 11:25

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Hmmmm - my Server is Full 24/7 - i'm unable to remove all other plugins :cry: - sorry.

But i leave it running for now.

KWo 03-07-2007 17:18

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Write amxx_plugins in the console to show me the plugins You are runing there.

AllMassive 03-09-2007 04:07

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Here my Plugins:
I dont use the Autoteamswitch-Option of PTB - just joining the Winningteam is limited.

KWo 03-09-2007 09:39

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
How often that stack error does happen for You?
Are You able at least pause some plugins (from plugins menu) High Ping Kicker and Play or Be Kicked (then save paused)? What is the last one for (JETB)?

AllMassive 03-09-2007 11:00

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
This error only happend once since i installed your 1.4.1-Version.

JETB: http://forums.alliedmods.net/showthread.php?p=69047

The Problem is that this error doesnt show up often ... Next time i see this error in the Logs i will disable the 2 Plugins you mentioned.

zeus1022 03-15-2007 20:37

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
I was wonder and trying to figure this out... please be patient with me :)
How do i limit 1 maybe 2 awps on each team but without a round limiter on??? Meaning, no matter how many rounds ahead the team is, either team can buy only 1 or 2 awps no only. and disable the purchase of autos completely.

Thank you ahead of time for the help :)

KWo 03-16-2007 04:05

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Quote:

Originally Posted by KWo (Post 444328)

* COMMANDS:
***********
*
* max_awps <xx> - Maximum Awps Allowed
* max_autos <xx> - Maximum Autos Allowed
* winspread_awp <xx> - When This Many Rounds Ahead, No Awps Allowed
* winspread_auto <xx> - When This Many Rounds Ahead, No Autos Allowed
* autolimit <1/0> - 1 = Restrict Auto, 0 = Don't
* awplimit <1/0> - 1 = Restrict Awp, 0 = Don't
* checkrebuy <1/0> - 1 = Prevent Rebuy Command, 0 = Don't
* TIPS:
* To ALWAYS restrict to X number of awps/autos set winspread_awp/auto to 0 and max_awps/autos to however many awps/autos


zeus1022 03-16-2007 12:22

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Do i set those thru console? and if so does that save it? i have tried pretty much everything. I must be doing something wrong.

KWo 03-16-2007 12:51

Re: Limit AWP/G3SG1/SG550 with Team Limit and Win limit (CS 1.6) v1.4
 
Write them at the end of amxx.cfg


All times are GMT -4. The time now is 10:28.

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