AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   Restrict Item (https://forums.alliedmods.net/showthread.php?t=56863)

^BuGs^ 06-22-2007 16:02

Restrict Item
 
2 Attachment(s)
This plugin is an advance item restriction script with the ability to restrict in these categories: global, team (CT or T), map, and per player. There are many commands and status of functionality.


Please read the README_RESTRICT.txt file on how to use all available commands for the current download. Post all bug reports/ideas here and view current status here. Bug reports/ideas posted on the forums will not be taken. If you do not report bugs, I will not be able to fix it. Use your forums username and password to login to the system!

CREDIT:
  • BAILOPAN - Sourcemod/Help/Issue List And SVN Hosting
  • FlyingMongoose - Help with the "Buy"/Suggestions and Ideas
  • Olly - Native Support
  • teame06 - KeyVars Functions
  • theY4Kman - GUI I/O/Tester
  • Knagg0 - Hacks
UPGRADE INTRUCTIONS:

For any version that is below 1.0.5.0, you must delete all of the restrict files first then restart the server (total shutdown and restart). You must do this as I have changed the filenames. To check this look at the cvar value (restrict_item). The CVAR is now "sm_restrict_version" and should say 1.1.0.0 if you installed it correctly. For 1.1.1.0 upgrade, you should delete all the data files that you currently have and use the new defaults.

REQUIREMENTS:
CVARS:
  • sm_restrict_buildversion - Used to check what build Sourcemod was made on
  • sm_restrict_version - Used for stats tracking only.
  • sm_restrict_status - Used to turn off/on checking.
    • 1 = on
    • 0 = off
DEFAULTS:

Defaults will load by default using the system's data system. If you would like to turn this off, change the settings in: configs/restrict/restrict.cfg
  • Global Restrictions: None
COMMANDS:
  • sm_restrict status - Shows current status
  • sm_restrict on - Turns on
  • sm_restrict off - Turns off
  • sm_restrict limit - Sets Item Limits
  • sm_restrict all - All Weapons and Equipment
  • sm_restrict weapon(s) - All Weapons
  • sm_restrict equip(ment) - All Equipment
  • sm_restrict group - Enable Group "Fights"
  • sm_restrict item - For setting one or more item.
  • sm_restrict list - Shows current restricts/limits
  • sm_unrestrict all - All Weapons and Equipment
  • sm_unrestrict weapon(s) - All Weapons
  • sm_unrestrict equip(ment) - All Equipment
  • sm_unrestrict group - Enable Group "Fights"
  • sm_unrestrict item - For setting one or more item.
For more detailed usage, please see the README file and what permissions you need.

LIMIT vs. ITEM

If you are going to set an item(s) limit to 0, it's the same thing if you use the "item" sub-command. You are inviting yourself on more mistakes that way. For example, these two examples are the same thing.

sm_restrict item global awp
sm_restrict limit global 0 awp

Why do I suggest the item one? Because it doesn't have to go through so many checks when processing which might cause errors if you are running the command in your cfg file.

FILE STRUCTURE:
  • data/restrictitem
    • All Data Files
  • plugins/
    • restrict.smx
  • scripting/include/restrict.inc (API)
  • scripting/
    • restrict.sp
    • restrict/
      • All Development Files
VALID NAMES:
  • glock
  • usp
  • p228
  • deagle
  • elite
  • fiveseven
  • m3
  • xm1014
  • galil
  • ak47
  • scout
  • sg552
  • awp
  • g3sg1
  • famas
  • m4a1
  • aug
  • sg550
  • mac10
  • tmp
  • mp5navy
  • ump45
  • p90
  • m249
  • primammo
  • secammo
  • vest
  • vesthelm
  • flashbang
  • hegrenade
  • smokegrenade
  • defuser
  • nvgs
CHANGELOG:
  • 1.1.5.0 (10/06/07)
    • Fixed memory leak issue in the keyvars section and config area.
    • "sm_restrict save <group>" now works, must have "data/restrictitem" folder created for it to save
    • Went over comb with a fine tooth comb to optimize the code for better processing.
    • Ferret's Vote API manager was removed (including restrict.vote.sp); Delete this file off folder.
  • 1.1.4.0 (08/10/07)
    • (17:22:24) ([Arnold]) changelog: - added support for idiots selfmade buyscripts
  • 1.1.3.0 (08/03/07)
    • Make natives optional; API commands can now be programmed in and will run if only if restrict is running depending on the plugins settings (FS#687)
    • You can now do pure pistol rounds (FS#688)
    • Changed to PlayerTarget for checking if a player is vaild (FS#695)
  • 1.1.2.0 (07/22/07)
    • sm_restrict save team <t|ct> failed (FS#634)
    • Client that were dead were being check during weapon limit check; this is now fixed (FS#643)
  • 1.1.1.0 (07/15/07)
    • Forgot to uncomment ReadConfig() (FS#554)
    • OnMapStart or OnMapEnd is not firing. (FS#555)
    • Change the commands so they can be run from the RCON (FS#605)
    • Create the "limit" load functions (FS#623)
    • Limits can be Saved/Restored (FS#448)
    • sm_restrict list -- See what items are restricted (FS#627)
  • 1.1.0.0 (07/03/07; Note: No tickets were created as there was so many changes)
    • CVAR Conflict
    • Droping a "limited" item doesn't remove it from the count!
    • Save/Delete/Restore Server Defaults
    • Item Restricted Mid Round --> Item Can Not Be Fired
    • Change variables to conform with Sourcemod and file structure
    • Re-designed the command line input algorithm
    • Ability to disable plugin storage system
    • The user who restricts will get a message back if the item they tried to restrict worked or not
    • Messages will go out to all effected users who fall under a new restriction or limit (removes unneeded spam)
    • Bots now follow restriction rules.
  • 1.0.5.0 (06/23/07)
    • Turn off/on restriction (FS#436)
    • User Index Assigning Problem (FS#442)
    • Console Commands (FS#435)
    • Limit # of items (FS#431)
    • StrEqual replaced with strcmp (FS#433)
    • If all items are restricted, and you view the status panel, it will just say "All items are restricted" instead of listing them all. (FS#443)
  • 1.0.0.0 (06/22/07)
    • Public Release
HELP:

If you are having problems, post your questions in here. If I confirm in here it is a bug, I will ask you to create a bug report. Access_RCON flag needed to use the data storage system from in-game, which must be enabled in the configs/restrict/plugin.restrict.cfg. If this is not set, sm_restrict [save/restore] [global/map/team <t|ct>/player <name>] or sm_restrict limit [global/map/team <t|ct>] [save/restore] will not work and you will get the restrict invalid message.

teame06 06-22-2007 16:26

Re: [PLUGIN] Restrict Item
 
Gaben Sonic BOOM.

Great btw

theY4Kman 06-22-2007 20:14

Re: [PLUGIN] Restrict Item
 
It's great that it's finally released. I see that it's mod independent now, which is great :D

^BuGs^ 06-22-2007 20:30

Re: [PLUGIN] Restrict Item
 
Quote:

Originally Posted by theY4Kman (Post 493473)
It's great that it's finally released. I see that it's mod independent now, which is great :D

I have to do that. Right now it only works for CS:S. I will change it to mod independent for version 1.5.0.

theY4Kman 06-23-2007 00:07

Re: [PLUGIN] Restrict Item
 
Oh, then I misunderstood what I saw in #sourcemod...

^BuGs^ 06-23-2007 02:04

Re: [PLUGIN] Restrict Item
 
Yeah. :-P I have it planed to be mod-independent.

^BuGs^ 06-23-2007 18:52

Re: [PLUGIN] Restrict Item
 
Updated.
I like to test some of this stuff out with people. Please contact me so we can test. Testing by-myself is boring. :)

Sputnik53 06-24-2007 07:00

Re: [PLUGIN] Restrict Item
 
Will this work?
Code:

sm_unrestrict all
sm_resrtict equipment nightvision
sm_restrict on

So now only nightvision is globally restricted, everything else can be bought.

EDIT: Didn't work.

EDIT2: Problem solved, edited restrictitem_globalteam_keys.txt.

^BuGs^ 06-24-2007 12:18

Re: [PLUGIN] Restrict Item
 
The second list does not do anything. It would have been: sm_restrict item <nightvision alias> global. I'll update the README file with the list of valid item names. nightvision is not a valid name. sm_restrict equipment <type of restriction> disables all equipment except C4 and defuse kit.

Sputnik53 06-24-2007 15:57

Re: [PLUGIN] Restrict Item
 
Quote:

Originally Posted by ^BuGs^ (Post 494104)
The second list does not do anything. It would have been: sm_restrict item <nightvision alias> global. I'll update the README file with the list of valid item names. nightvision is not a valid name. sm_restrict equipment <type of restriction> disables all equipment except C4 and defuse kit.

Well the Readme is kinda confusing and nothing works so. :(
What is the alias for nightvision?


All times are GMT -4. The time now is 08:05.

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