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

[ DEVELOPMENT PLUGINS ] Two plugins I am working on...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
^BuGs^
Senior Member
Join Date: May 2007
Old 05-19-2007 , 17:12   [ DEVELOPMENT PLUGINS ] Two plugins I am working on...
Reply With Quote #1

Hello all! Let me introduce myself. Shane, aka ^BuGs^, am a coder and gamer. So I felt that since I like Sourcemod so much I am working on two scripts for Sourcemod and hopefully they will be out and working by the time Sourcemod is released for general use. The two scripts are “Restrict Items” and “Ratio Item Restrict”.

Restrict Items


“Restrict Items” is a new version of the Restrict script by Lduke were you have many more setting though. The way I am designing this script very complex so let me talk about it more in depth before questions are asked.


This script will – by name – will be able to restrict items based on the server settings. However, it will not only be global, but also team based, map based (which has 2 more sub-levels to it), and player.
  • Global “Settings” - What ever set under this field will be disabled for all no matter what.
  • Team “Settings” - Based on the team can those players buy items. T and CT respectfully.
  • Map “Settings” - In it's most basic for based on the current map the server is playing.
  • Player “Settings” - Based on the user's SteamID, you can remove someone's ability to use a certain weapon.
The map “sub” settings include team and player. So you will be able to set team CT de_dust2 without flashes but only when this map is active. If you did player, you could restrict someone on de_dust2 to not using.. pick your hates weapon here by this player.


The script will have these option I am not going in depth:
  • Player can not pick up weapon if they are not allowed to use it based on the settings
  • If the player tries to shoot a restricted weapon, it will not fire.
  • Admin GUI Settings – No need for commands!
So it really has come along way from the first version for SourceMM. Along with the basic script, there will be an included restrict.inc file that will be included so other scripts can run the functions in the complied version. “Restrict Item” – when using the “I/O” -- will be a progressive checker to make sure items passed through are valid to be allowed to use. However, there will be a “force” boolean for overriding the default functionality. For example...


Ratio Item Restrict


“Ratio Item Restrict” is based off an idea that the EAST COAST GUARDINGS rule have of a “3:1” kill/death ratio and then you drop to pistols only. However, this script will do this automatically figure out of the user reaches that ratio based on their frags/deaths with a minimum frags settings. There are two basic settings – global and per “item”.


Sample KeyValues Settings:


Code:
"RatioLimit_Items"
 {
     "Items"
     {
         "global_ratio"        "3:1"
         "min_frags"        "20"
         "check_frags"        "true"
         "check_midround"        "true"
         "exlcude_admins"        "false"
         //    item list        
         "flashbang"        "true"
     }
     "ak47"
     {
         "custom_ratio"        "2:1"
         "min_frags"        "10"
         "check_frags"        "true"
         "check_midround"        "false"
         "exlcude_admins"        "false"
     }
     "m4a1"
     {
         "custom_ratio"        "2:1"
         "min_frags"        "10"
         "check_frags"        "true"
         "check_midround"        "false"
         "exlcude_admins"        "false"
     }
 }
So with these settings it tells me this. If you have a 3:1 ratio in frags/deaths, and you have 20 or more kills you will be restrict from using a “flashbang”. Also as you kill people and do not die yet, and reach your ratio of 3:1 you will be restrict mid-game (var: check_midround). Also admins will fall under this rule – setting this to true allows admins not to be included in the check. However, there is a special restriction for the “ak47” and “m4a1” which have the same settings. If you get at least 10 frags and your ratio is 2:1 is true, you will not be able to use/buy/pickup these weapons and will be checked, however not mid-round.


This script uses the bases off my other script -- “Restrict Item”. This script will not override settings set forth by the “Restrict Item” script. If you already have “awp” under “Restrict Item” settings for anything -- global/team/map/player -- and it's active -– this script will not even phrase the “awp” settings even if they exist to be allowed to use. It will not unrestrict an item just because you fell under the ratio.


So that's about it. A few features not getting into depth about:
  • Admin GUI Settings – No need for commands!
Possible “addons/checks”:
  • Allow “donated/reserved slots” to not be checked based on global/item restriction checks
Status of Both Script


“Ratio Item Limit” is almost done... however it has lots of bugs a needs the restrict item script to work. The “Restrict Item” script is still in the first phases as there are just so many options to check and code. So that's about it. Both scripts will be first in “alpha” status – and it will be released to people who apply and/or help be debug and/or fix the script. “Beta” status will be released to the public for further refinement and same with “Release Candidates”.


That's about it! Hope I was clear! Any questions/idea/help?
^BuGs^ is offline
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 05-22-2007 , 08:32   Re: [ DEVELOPMENT PLUGINS ] Two plugins I am working on...
Reply With Quote #2

- Would be handy to be able to restrict XX amount of weapons per team, lets say allowe 1 AWP per team.
- Also dont forget to implement a (default HL2) sound when people try to buy a restricted weapon.
__________________
tcviper is offline
Send a message via MSN to tcviper
^BuGs^
Senior Member
Join Date: May 2007
Old 05-22-2007 , 14:54   Update in status...
Reply With Quote #3

Update!

I spent most of the day re-writing the entire Restrict Script and with some help from the Dev team and a good night's sleep, it now can restrict items based on "global", "team", "map (global)", and "player (global)".

A sound plays now when you can not buy the function. I forgot to mention that if the CT for instance can not ever buy/use ak47 and you were on the CT team, you could not pickup the ak47, but a T could.

Right now the hieharchy of checking is global, team, map, map (team), map (player), player. If anyone has any other order, let me know.

There is no functionality right now in setting or using server commands yet. Right now if you installed this script, you have to edit the "data" files manually.
^BuGs^ is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 05-22-2007 , 19:31   Re: [ DEVELOPMENT PLUGINS ] Two plugins I am working on...
Reply With Quote #4

make the "1 team can't pick up other teams weapons" an optional feature, because it's a key part of the game.
FlyingMongoose is offline
^BuGs^
Senior Member
Join Date: May 2007
Old 05-22-2007 , 21:28   Re: [ DEVELOPMENT PLUGINS ] Two plugins I am working on...
Reply With Quote #5

Quote:
Originally Posted by FlyingMongoose View Post
make the "1 team can't pick up other teams weapons" an optional feature, because it's a key part of the game.
Good point.
^BuGs^ is offline
^BuGs^
Senior Member
Join Date: May 2007
Old 05-27-2007 , 12:07   Re: [ DEVELOPMENT PLUGINS ] Two plugins I am working on...
Reply With Quote #6

Update per say...

Restrict script is completed in it's most basic form. You have to edit the "restriction" files manually: there is no in-game GUI menu and no in-game commands.

Two options are taken out right now as we been trying to develop a solution: map (team) and map (player). Both need a little more work in trying to "read sub-sub-keys" of KeyVaules files. I will let you know how this is progressing.

Now, for testing, I am willing to release it on a limited bases right now. So contact me if you want to test it on your Sourcemod server. You need the latest compile of Sourcemod and 1.4.1 SourceMM.
^BuGs^ is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 05-27-2007 , 12:12   Re: [ DEVELOPMENT PLUGINS ] Two plugins I am working on...
Reply With Quote #7

I have to kno....why do per-map?

Because you can by default disable all restrictions then load up the restrictions on map change from a file.

Since maps are able to have per-map configs (in most plugins) you can generally assign restrictions via a cfg file per-that map.

You shouldn't have to do a "per-map" set up in the plugin as that honestly wastes memory IMO.
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers
FlyingMongoose 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 04:30.


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