Addon Details

Watch - Add Favorite


Does this version work for you?
28
w00ts
w00t!2

EZRestrict - Version 8

posted on 2007-07-12 01:53:21
by SuperDave



Description

[b]This addon requires [url=http://www.eventscripts.com/pages/Es_fire]es_fire[/url] to run: [url]http://forums.eventscripts.com/viewtopic.php?f=27&t=42620[/url] Please run this if you are experiencing crashes: [url]http://forums.eventscripts.com/viewtopic.php?f=95&t=41981[/url][/b] Restricts players or teams from weapons. Only ES 2.1+ Options:[syntax="es"]// EZRestrict release 8 options // ./addons/eventscripts/ezrestrict/ezrestrict.cfg // http://addons.eventscripts.com/addons/view/ezrestrict // Load this addon with: es_load ezrestrict // To configure language settings for EZRestrict please see ezrestrict_languages.ini // --- THIS ADDON DOES NOTHING UNLESS PROMPTED --- // PLEASE NOTE *PLAYER* restrictions only last until the end of the map. PLAYER restrictions must be set again for each map. // @all, @t, and @ct restrictions never expire. // ***** Options ***** // Number of seconds a weapon will be unavaible for pickup after a restricted player attempts to pick the weapon up ezrestrict_restrict_repickup 2 // 0 = no change, 1 = when a player picks up a weapon both teams are restricted from the weapon is removed ezrestrict_restrict_removebanned 1 // 0 = no change, 1 = players receive a console message when they try to pick up a restricted weapon, 2 = players receive a chat area message when they try to pick up a restricted weapon ezrestrict_announce 0 // ***** Usage documentation ***** // The new server commands introduced by this addon are: // ezrestrict -player/team- -weapon 1- [weapon 2] ... [weapon n] // ezunrestrict -player/team- -weapon 1- [weapon 2] ... [weapon n] // ezrestrict_removeidle [weapon 1] [weapon 2] ... [weapon n] // *** When used without arguments ezrestrict_removeidle removes all idle weapons (excluding the C4) // ezrestrict_saferemove -index- // *** Ensures the entity exists before removing it (removing a non-existent entity will crash the server) // You can use these commands in an addon, with rcon, or directly on the server. // *** The -player/team- argument accepts: userid / player name / SteamID / #t / @t / #ct / @ct / #all / @all // @ arguments apply to teams directly. # arguments apply to members of the team. // Players will be prohibited from picking up a weapon if the weapon is restricted either to the player or the player's team. // *** The -weapon- argument accepts: weapon name / #all / #primary / #rifle / #shotgun / #smg / #sniper / #secondary / #pistol / #knife / #grenade // In you can exclude # categories by replacing the "#" with a "!", ex: #rifle,!sniper // For a complete list of tags available for every game see: http://python.eventscripts.com/pages/Weaponlib // Below are acceptable weapon names: // deagle - Night Hawk .50C // ak47 - CV-47 // scout - Schmidt Scout // aug - Bullpup // g3sg1 - D3/AU1 // galil - IDF Defender // famas - Clarion 5.56 // m4a1 - Maverick M4A1 Carbine // sg552 - Krieg 552 // sg550 - Krieg 550 Commando // m249 - M249 // awp - Magnum Sniper Rifle // tmp - Schmidt Machine Pistol // mp5navy - KM Sub-Machine Gun // glock - 9x19mm Sidearm // elite - .40 Dual Elites // m3 - Leone 12 Gauge Super // xm1014 - Leone YG1265 Auto Shotgun // usp - KM .45 Tactical // mac10 - Ingram MAC-10 // ump45 - KM UMP45 // p228 - 228 Compact // fiveseven - ES Five-Seven // p90 - ES C90 // hegrenade - HE Grenade // flashbang - Flashbang // smokegrenade - Smoke Grenade // knife - Knife // c4 - C4 (Note that C4 is not included in the #all tag) // Weapon names can also be preceded with "weapon_" // *** The -index- argument accepts only an entity index number. // ***** Event documentation ***** // This addon creates the following event which can be utilized by other addons similar to standard events: // ezrestricted_pickup // event_var(userid) - Userid of the player who picked up the restricted weapon // event_var(weapon) - Restricted weapon that was picked up // event_var(longname) - In-game name of the restricted weapon that was picked up // event_var(weaponindex) - Index of the restricted weapon that was picked up (returns -1 if the weapon was removed) // This event also provides event_var(es_steamid), event_var(es_username), and all the other event_vars that accompany // event_var(userid). More information can be found here: http://www.eventscripts.com/pages/Extended_event_variables // ***** Python documentation ***** // In addition to server commands EZRestrict offers Python commands. In order to utilize the Python commands EZRestrict must be loaded // before your addon and your addon must contain the import line: // ezrestrict = es.import_addon("ezrestrict") // You may then use the following commands: // ezrestrict.restrict(-player or players-, -weapon or weapons-) // ezrestrict.unrestrict(-player or players-, -weapon or weapons-) // ezrestrict.removeidle([weapon or weapons]) // ezrestrict.saferemove(-index-) // Player arguments can be an integer userid, a string containing a value acceptable as a player argument to the server commands, or any object that can be iterated containing acceptable string or integer values. // Weapon arguments can be a string or any object that can be iterated containing values acceptable as weapon arguments to the server commands. // Index argument is an integer entity index or any object that can be iterated containing integer entity indexes. [/syntax] Please see the forum link below for more translations or if you have a translation to add. Please also post general questions or comments. You can also find a few usage examples with the forum link.

Installation

Install with:[syntax="es"]es_install ezrestrict[/syntax]Load once for [b]ezrestrict.cfg[/b] to appear:[syntax="es"]es_load ezrestrict[/syntax]Configure your options in [b]ezrestrict.cfg[/b] and then reload the addon.

Version Notes For 8

Updated on: 2011-06-04 23:01:59 EST by SuperDave (View Zip Contents)
- Fixed an issue with the localization file that prevented weapons from being restricted. - Added "unknown weapon" to the localization file

( Previous Versions )