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


Raised This Month: $ Target: $400
 0% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 15:32.


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