Raised This Month: $51 Target: $400
 12% 

Restrict Item


Post New Thread Reply   
 
Thread Tools Display Modes
^BuGs^
Senior Member
Join Date: May 2007
Old 06-26-2007 , 23:26   Re: [PLUGIN] Restrict Item
Reply With Quote #21

http://bugs.alliedmods.net/?do=details&task_id=481
__________________
Sourcemod Plugin Author and Plugin Approver
"The correct way is MAXPLAYERS + 1"
I will not take bugs/new idea reports over the forums. Please use the issue list.
^BuGs^ is offline
^BuGs^
Senior Member
Join Date: May 2007
Old 07-02-2007 , 01:31   Re: Restrict Item
Reply With Quote #22

Update on the status of the script!

Good news everyone. After some hard work, and a little pressure for the people inside #sourcemod to finish this thing up, it now works (minus saving and restore limits and GUI). In the version about to be released, the GUI I/O was taken out because it was just getting in the way and it needs to be cleaned up. So for now there will be no GUI, all command line.

Now after a discussion with a fellow scripter, he suggested I make it optional to even use my data storage system. So this will be added where if it's disabled via a config file, nothing will process at the start of each map. It would have to be done manually if disabled or command lines be placed in a CFG file. Some of the things below are items that were worked on and/or changed and also need your feedback!

Command Line Structure Re-Worked

Before you can only limit or restrict one item at a time. I re-worked the code that you can do multiple items at once.

Example:

Code:
sm_restrict item global awp m4a1 deagle
Or in chat:
Code:
!restrict item global awp m4a1 deagle
/restrict item global awp m4a1 deagle
That's in this version.

Before:

Code:
sm_restrict item awp global
sm_restrict item m4a1 global
sm_restrict item deagle global
All Quick (un)restrict groups include: all, weapon(s), equip(ment), pistols, shotguns, rifles, and non rifles.

Limit Number of Item's In "Active" Mode


This is now coded fully and working perfectly. It took several re-writes of this section for it to work, but it does. By default "checking", if you buy an item, it will count towards being an active item. If it's dropped, it will be taking out of the active count. If you try to pick up an item, and picking it up makes it go over the limit, you won't be able to. If you die, those items that you drop will be dropped from the active count. Right now the only items that seem to have problems with the "active" out their count are the Flashbangs as you can hold two of them. The system doesn't count it being "used" right now if you still have one left in your inventory, but does take away the item from the active count once it's completely gone.

Commands are just like restrict except...

Code:
sm_restrict limit global 1 m4a1 deagle awp - 1 per game
sm_restrict limit global 0 m4a1 deagle awp - Disables items
sm_restrict limit global -1 m4a1 deagle awp - Enabled items (removes limit check)
Note -- there is no...

Code:
sm_unrestrict limit <AREA> <VALUE> <ITEMS>


Why is there a "map" switch? Isn't global the same thing?
I have been hassled on why I have a switch for map.

Some command code equivalent:
Code:
sm_restrict all map
sm_restrict item map m4a1 deagle awp
sm_unrestrict weapons map
Code:
sm_restrict all global
sm_unrestrict pistols global
The reason I added a map switch is because of the way I do data storage.

First of all, the global restrictions data file will would always execute on any map, not matter what it was. However the map would load settings only from the map being loaded. This way, as shown in the README, you can put the three powerful sniper rifles in the global "load" no matter what. Then if a map came up were you thought an item should never be allowed it would be loaded. It's loaded into it's own array check because if you did a "save" it would then go into the "global" file, which would happen each map.

There will be a way to disable the groups based on the MAP type.
  • cs_
  • de_
  • fy_
  • gg_
  • as_
  • ANY_PREFIX_HERE_
This is not coded yet. However, I will make sure I put a way for certain map types to get check for permissions.

Item limits are not yet "savable", "deletable", "loaded", or "restore". They will be done before release. This can also be disabled for the different map types as well.

More will be explained in a very detailed PDF being created.

Why should I use your data system? Storing the restrictions in CFG manually is just fine for me.

That's true. It's is easy. But I built the storage system so people that you give Admin RCON access to could save defaults for the 4 different groups -- global, team (t and ct), map, and player. This removed the ability for you to open your server to eyes that you do not want to have.

Scripting Code (.sp) Files


I have broken down the code from one .sp file to many .sp files. Just like teame06 did with GunGame:SM to keep things clean. However, it makes it very hard to compile the .sp files on the website and an programing editor is required.

API

There will be provided API documentation in the PDF documentation so you can make plugins that utilized the restriction script, even if you don't use restrictions all the time on the server.

One good example is the Ratio script I am developing. No restrictions on a server with this script and the Ratio script allows the ratio script to decided if the items would be restricted for that player. I.e. 20+ kills with a 3:1 KDR, disable all weapons except pistols.

IRC

IRC support will exist also where you can do all the same commands from within IRC using Olly's IRC Relay plugin, however I am waiting for a Sourcemod feature before coding this in.

Translations

Official translations will not exist in the upcoming release. However, they will come with the GUI is completed. Right now english is the only language you can get it in.

What type of messages do users get when they join a server with restrictions in place?None, right now.that's why I want you to read the next item. There are two many options to choose from, and I need your input. If Dialog that popups up on join team, this would be the only GUI coded before the full menu system -- which also requires a massive update to the menu API for sourcemod.

Your Feed Back

Some people say I can't take suggestions.. that might be true when I am annoyed at errors, and I gotta work on that, but I do require your feedback on what kind of options you want and configurations you want. Config "talk" does not require a ticket in the support system, but anything other than config suggestions do. That's about it. I hope you all enjoy the new release coming real soon.
__________________
Sourcemod Plugin Author and Plugin Approver
"The correct way is MAXPLAYERS + 1"
I will not take bugs/new idea reports over the forums. Please use the issue list.

Last edited by ^BuGs^; 07-02-2007 at 02:55.
^BuGs^ is offline
Falco
SourceMod Donor
Join Date: Dec 2004
Location: CANADA
Old 07-02-2007 , 13:45   Re: Restrict Item
Reply With Quote #23

Can't wait to try.
__________________
[DmZ|EPSILON CSS 70.75.139.92:27016
[DmZ|EPSILON GG 70.75.167.30:27015
[DmZ|EPSILON CS:GO Classic Casual 70.75.139.92:27013
[DmZ|EPSILON CS:GO Demolition 70.75.139.92:27014
[DmZ|EPSILON BF3 69.46.43.221:25203 (8-slot) Practice Server
www.dmzepsilon.ca
----------------------
Falco is offline
^BuGs^
Senior Member
Join Date: May 2007
Old 07-03-2007 , 15:09   Re: Restrict Item
Reply With Quote #24

Updated to 1.1.0.0

I opted to release the updated version now without the "map type" checker for the internal data system. However I did provide a way to disable the internal data system so you can use a command line interface instead. Please read the update first post for upgrade instructions. There have been over 50+ hours in testing in this version alone and I didn't have any problem, not that they do not exist.

The API documentation and the PDF will come out with the GUI I/O in 1.5.0.0.

Enjoy!
__________________
Sourcemod Plugin Author and Plugin Approver
"The correct way is MAXPLAYERS + 1"
I will not take bugs/new idea reports over the forums. Please use the issue list.

Last edited by ^BuGs^; 07-03-2007 at 15:25.
^BuGs^ is offline
Onix.fr
Member
Join Date: Nov 2006
Location: Mer, (FRANCE) 41
Old 07-04-2007 , 05:21   Re: Restrict Item
Reply With Quote #25

Hello,

I think that restrictitem_limit_keys.TXT is for limit an item for all map

so how to edit the file restrictitem_limit_keys.TXT ?

"Restrictitem_Limits_GlobalTeam"
{

}
Onix.fr is offline
Onix.fr
Member
Join Date: Nov 2006
Location: Mer, (FRANCE) 41
Old 07-04-2007 , 08:11   Re: Restrict Item
Reply With Quote #26

In fact, Isearch how to restrict awp to 1 per Team.

I've try to put this line in my server.cfg :

sm_restrict limit awp team t 1
sm_restrict limit awp team ct 1

but that don't works.
Onix.fr is offline
^BuGs^
Senior Member
Join Date: May 2007
Old 07-04-2007 , 13:16   Re: Restrict Item
Reply With Quote #27

Code:
sm_restrict limit team 1 awp
Since you are doing both teams, you don't need T or CT. Read the README file. It's all in there exactly how you have to do everything. The keys file is not yet coded, as I said in the updated post on the front page, so for now you have to put it in a cfg file for it to be run on ever map change.
__________________
Sourcemod Plugin Author and Plugin Approver
"The correct way is MAXPLAYERS + 1"
I will not take bugs/new idea reports over the forums. Please use the issue list.

Last edited by ^BuGs^; 07-04-2007 at 13:20.
^BuGs^ is offline
Onix.fr
Member
Join Date: Nov 2006
Location: Mer, (FRANCE) 41
Old 07-04-2007 , 17:24   Re: Restrict Item
Reply With Quote #28

in console this command work very well :

sm_restrict limit team 1 awp
sm_restrict limit team 0 g3sg1
sm_restrict limit team 0 sg550


but in a restrict.cfg file they don't work ?

cfg/restrict.cfg

in server.cfg : exec restrict.cfg
Onix.fr is offline
^BuGs^
Senior Member
Join Date: May 2007
Old 07-04-2007 , 17:27   Re: Restrict Item
Reply With Quote #29

I have no idea about the cfg files on when they get loaded. I think server.cfg gets loaded only one time, and that's only when the server starts.
__________________
Sourcemod Plugin Author and Plugin Approver
"The correct way is MAXPLAYERS + 1"
I will not take bugs/new idea reports over the forums. Please use the issue list.
^BuGs^ is offline
Onix.fr
Member
Join Date: Nov 2006
Location: Mer, (FRANCE) 41
Old 07-05-2007 , 03:06   Re: Restrict Item
Reply With Quote #30

server.cfg is exec at each map

I don't understand how to use your plugin lol
Onix.fr 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 06:51.


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