EventScripts Forums
Mattie's EventScripts and Source Forums
Mattie recommends...
Premier Sponsor:Platinum Sponsor:
 
Script Categories
addon (49) admin (269) admins (14) advert (15) adverts (19) afk (15) alerts (12) ammo (23) anti (15) auth (16) automatic (11) awp (23) ban (18) ba_jail (17) bhop (19) block (18) bomb (40) bonus (23) bot (24) bot-management (19) bots (17) bunnyhop (11) Buy (21) cash (65) chat (57) cheat (11) clan (16) classes (22) color (21) colors (18) command (20) commands (18) config (22) connect (42) CS:S (16) css (2513) Damage (36) database (11) dead (15) death (19) deathmatch (70) deathrun (12) disconnect (18) Dissolve (11) dm (20) dod:s (11) dods (389) easy (18) effects (120) English (15) entity (21) es_tools (12) Eventscript (12) flashbang (25) français (99) french (36) fun (288) funny (16) Gabeee (11) gameplay (174) give (16) gravity (11) grenade (25) grenades (29) gun (14) GunGame (26) GunGame5 (11) guns (17) Hack (15) headshot (32) health (55) hegrenade (13) hl2dm (332) HP (13) info (48) information (16) IP (11) jail (26) jailbreak (11) join (23) jump (12) kick (22) kill (44) kills (22) knife (57) leveling (36) management (14) mani (14) map (25) map-management (27) maps (15) match (17) menu (106) message (20) messaging (52) mod (109) model (14) models (32) money (42) motd (13) music (29) mute (17) nades (18) name (13) noblock (35) player (40) player-management (31) player-tracking (28) popup (56) props (23) protection (27) punishment (49) python (63) quake (18) radio (21) random (36) rank (35) rates (16) rcon (13) realism (21) respawn (61) restrict (36) round (20) rpg (24) rules (41) say (11) scout (19) Script (20) script-helper (25) scriptpack (33) sdk (151) server (44) server-tools (42) shop (12) silly (31) simple (27) skins (25) slay (13) soccer (11) sound (45) sounds (92) spanish (11) spawn (63) speed (25) statistics (13) stats (48) status (11) STEAMID (24) Superhero (13) surf (31) Team (25) team-balance (14) teleport (12) text (14) TF2 (143) time (17) timer (14) tools (15) tracers (17) triggers (11) uedi (18) uses_auth (18) utility (11) vip (12) vote (36) voting (22) war (20) wcs (24) wcs:Python (32) weapon (77) weapons (114) web (14) welcome (12) zm (24) zombie (90) zombiemod (51) zombies (11)
Script Authors
*XYZ*SaYnt (12) .:MiB:. (11) .eMko* (6) 101satoon101 (10) 3R10N (24) 4u571n91 (5) 7355608 (9) Absolute (8) Ace Rimmer (40) adminc (5) Adz (8) AgathaKnuppelkuh (8) aidden (8) ajax (5) ak_47 (6) Al3c Tr3v3lyan (6) allstareng (5) ashbash1987 (9) ATAMAH (7) aznone (5) B00M (5) BackRaw (41) BFH_RedBull (8) bigfabi (7) Bioko (7) Blade (10) bladesback (13) bobdole (11) bodzsar1 (8) bonbon (36) Brainsucker (30) cagemonkey (8) carbon-14 (10) CaskioUTF (5) cbirou (15) ChaCaLz2psy4 (5) CharlesT (5) Chrisber (5) chrismrulz (9) Chun (6) cladiron (10) clipz934 (8) Colster (21) Cookieman8 (7) craziest (10) DanielB (19) Darkness123 (8) Dave (9) dbozan99 (7) deathx9 (5) Deathyy (16) dhack (16) Di[M]aN (12) DoCky (27) Don (15) dordtcore (8) DragonFreddo (8) Drassil (5) Einlanzers (42) EmbouT (10) emilplov (7) Errant (10) Eun (6) Fantole (9) Franc1sco (10) freddukes (18) Frequency (6) Fulmine (5) GAMEREN2 (8) german9114 (13) GODJonez (38) GoodfellaDeal (5) Hansi (6) HitThePipe (7) HOLLDIDAY (9) Icetouch (6) ichthys (25) infamous1 (9) Jeff91 (45) JoeyT2006 (30) Juba_PornBorn (12) jxl180 (10) KDBFame (6) L'In20Cible (7) Largo Usagi (10) Lobe (11) loKkdoKk (7) lolo-le-haricot (7) LosNir (5) Lumpi@Work (9) M4rc3L-XCN (7) macshot (6) Matth (6) Mattie (20) MBchrono (15) McFly (20) Medda (5) Memphis-84 (10) Messiah93 (12) Mickyy (5) micmacx (6) Mitchell (5) Mordavolt (7) MrScriptaz (5) mryoung (6) Nicolous (26) ojii (31) Omega_K2 (9) Owned|Myself (8) P3N (7) pand3mic (5) parsimba (5) Pascal257 (9) PatPeter (7) PDrop (10) Phaedrus (18) PhantOm Fury (7) phoenix131 (9) pinkyyy -.- (5) pitbull0993 (7) randomknifer (9) Ratzee (6) ReaCtioN2oo9 (6) Rennnyyy (17) revolutionfighters (6) RideGuy (12) Rio (9) Roeliekt (6) runamagic (13) sandking220 (6) Sarcasm_Poisoning (10) saRs| Johnny-5 (13) Schubaal (10) sea212 (5) sega74rus (7) sgt.angel (6) sicilia (5) sicman_adrian (22) skillz92 (7) sn4k3 (18) Snake12 (7) snake38 (10) sonicsight (7) spoonman184 (8) stabby (22) stas (22) Strontium Dog (30) SumGuy14 (25) SuperDave (45) surfteam (5) TaCo (5) TanaToS (17) Tealk (6) teowow (16) TheCheeTaH (20) TheDonFather (5) theresthatguy (6) Tiny Tod (7) Totyahun (9) uedi (38) Undead (25) usernamesaretaken (15) Warren (13) westham (6) WhiteAvenger (7) Wonder (14) X-Mania (5) XE_ManUp (13) xfalcon61 (5) zSweetXz (5) [Cs]Lord_Inferno2 (11) [NATO]Hunter (28) ||Wolf|| (10)
Search

Post new topic Reply to topic
Go to page 1, 2, 3, 4  Next
Author Message
User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-07-12, 12:53 am 
   Post subject: EZRestrict release 7

EZRestrict release 7

Requirements:Description:
    Introduces new server commands to restrict players or teams from weapons and to remove idle weapons. Requires only ES 2.0.0.248+

    Options:
    ES:
      // EZRestrict release 7 options
      // ./addons/eventscripts/ezrestrict/ezrestrict.cfg
      // <!-- m --><a class="postlink" href="http://addons.eventscripts.com/addons/view/ezrestrict">http://addons.eventscripts.com/addons/view/ezrestrict</a><!-- m -->

      // 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 restrictions only last until the end of the map. Restrictions must be set again for each map.
      // PLEASE ALSO NOTE restrictions can only be set on connected players.


      // ***** 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 team 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 ther 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

      // 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 events 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)

      // ezrestrict_player
      //    event_var(userid)          - Userid of the player who was restricted from a weapon
      //    event_var(weapon)          - Weapon that was restricted
      //    event_var(longname)        - In-game name of the weapon that was restricted

      // ezunrestrict_player
      //    event_var(userid)          - Userid of the player who was unrestricted from a weapon
      //    event_var(weapon)          - Weapon that was unrestricted
      //    event_var(longname)        - In-game name of the weapon that was unrestricted

      // Each 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: <!-- m --><a class="postlink" href="http://www.eventscripts.com/pages/Extended_event_variables">http://www.eventscripts.com/pages/Exten ... _variables</a><!-- m -->


      // ***** 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:

      // from ezrestrict import 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.


    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.
Download: Installation:
  • Extract .zip to game directory (./cstrike/) or use:
    ES:
      es_install ezrestrict
  • Add the following to autoexec.cfg:
    ES:
      es_load ezrestrict
  • Restart your server.
  • The first time the addon is loaded ezrestrict.cfg will appear in the addon's directory. Configure your options and then again restart your server.

Current language file:
./addons/eventscripts/ezrestrict/ezrestrict_languages.ini wrote:
# ./addons/eventscripts/ezrestrict/ezrestrict_languages.ini
# >>> For general addon configuration see ezrestrict.cfg <<<

# DO NOT translate words with $ or # in front!
# For a list of language abbreviations please see ./addons/eventscripts/_libs/python/deflangs.ini


[restricted pick up]
en="#defaultYou are restricted from the #lightgreen$weapon#default."

# CS

[deagle]
en="Night Hawk .50c (deagle)"

[ak47]
en="CV-47 (ak47)"

[scout]
en="Schmidt scout (scout)"

[aug]
en="Bullpup (aug)"

[g3sg1]
en="D3/AU-1 (g3sg1)"

[galil]
en="IDF defender (galil)"

[famas]
en="Clarion 5.56 (famas)"

[m4a1]
en="Maverick M4A1 carbine (m4a1)"

[sg552]
en="Krieg 552 (sg552)"

[sg550]
en="Krieg 550 commando (sg550)"

[m249]
en="M249 (m249)"

[awp]
en="Magnum sniper rifle (awp)"

[tmp]
en="Schmidt machine pistol (tmp)"

[mp5navy]
en="KM sub-machine gun (mp5navy)"

[glock]
en="9x19mm sidearm (glock)"

[elite]
en=".40 dual elites (elite)"

[m3]
en="Leone 12 gauge shotgun (m3)"

[xm1014]
en="Leone YG1265 auto shotgun (xm1014)"

[mac10]
en="Ingram MAC-10 (mac10)"

[ump45]
en="KM UMP45 (ump45)"

[usp]
en="KM .45 tactical (usp)"

[p228]
en="228 compact (p228)"

[fiveseven]
en="ES five-seven (fiveseven)"

[p90]
en="ES C90 (p90)"

[hegrenade]
en="HE grenade (hegrenade)"

[smokegrenade]
en="Smoke grenade (smokegrenade)"

[flashbang]
en="Flashbang (flashbang)"

[knife]
en="Knife (knife)"

[c4]
en="C4 (c4)"

# DOD

[30cal]
en="30 Caliber Machine Gun (30cal)"

[amerhand]
en="American Knife (amerhand)"

[bar]
en="Browning Automatic Rifle (bar)"

[bazooka]
en="Bazooka (bazooka)"

[basebomb]
en="Bomb Satchel (basebomb)"

[c96]
en="C96 Auto Pistol (c96)"

[colt]
en=".45 ACP 1911 (colt)"

[frag_ger]
en="German Frag Grenade (frag_ger)"

[frag_us]
en="American Frag Grenade (frag_us)"

[garand]
en="M1 Garand (garand)"

[k98]
en="k98 Mauser (k98)"

[k98s]
en="k98 Mauser Sniper (k98s)"

[m1carb]
en="M1 Carbine (m1carb)"

[mg42]
en="MG-42 (mg42)"

[mp40]
en="MP 40 (mp40)"

[mp44]
en="MP 44 (mp44)"

[p38]
en="P38 Luger (p38)"

[punch_ger]
en="Fist (punch_ger)"

[punch_us]
en="Fist (punch_us)"

[pschreck]
en="Panzerschreck (pschreck)"

[riflegren_ger]
en="German Rifle Grenade (riflegren_ger)"

[riflegren_us]
en="American Rifle Grenade (riflegren_us)"

[smoke_ger]
en="German Smoke Grenade (riflegren_ger)"

[smoke_us]
en="American Smoke Grenade (riflegren_us)"

[spade]
en="German Spade (spade)"

[spring]
en="1903 Sniper Rifle (spring)"

[stick]
en="German Stick Grenade (stick)"

[thompson]
en="Thompson SMG (thompson)"

# HL2DM

[357]
en=".357 Magnum (357)"

[alyxgun]
en=" (alyxgun)"

[annabelle]
en=" (annabelle)"

[ar2]
en="Overwatch Standard Issue (ar2)"

[brickbat]
en=" (brickbat)"

[bugbait]
en=" (bugbait)"

[citizenpackage]
en=" (citizenpackage)"

[citizensuitcase]
en=" (citizensuitcase)"

[crossbow]
en="Crossbow (crossbow)"

[crowbar]
en="Crowbar (crowbar)"

[extinguisher]
en=" (extinguisher)"

[frag]
en="Grenade (frag)"

[physcannon]
en="Gravity Gun (physcannon)"

[physgun]
en=" (physgun)"

[pistol]
en="9mm Pistol (pistol)"

[rpg]
en="RPG (rpg)"

[shotgun]
en="Shotgun (shotgun)"

[slam]
en="S.L.A.M. (slam)"

[smg1]
en="SMG (smg1)"

[stunstick]
en="Stunstick (stunstick)"

Please post if you have questions, comments, or help with translation!

_________________
Image
EventScripts Wiki --- #eventscripts --- Python.org --- es_install FAQ


Last edited by SuperDave on 2008-09-14, 1:47 pm, edited 12 times in total.




User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-07-12, 3:56 am 

The individual ezrestrict command will most likely only help admins restrict weapons from certain players while both the admin and the player are connected. With that in mind, here are some simple script examples for more advanced use of this command:

ES:
    // Restrict the awp from all players

    event player_activate

    {

       es ezrestrict event_var(userid) awp

    }

ES:
    // Restrict the glock from Terrorists

    // and restrict the usp from Counter-Terrorists

    event player_team

    {

       if (event_var(team) equalto 2) do

       {

          es ezrestrict event_var(userid) glock

       }

       else do

       {

          es ezunrestrict event_var(userid) glock

       }



       if (event_var(team) equalto 3) do

       {

          es ezrestrict event_var(userid) usp

       }

       else do

       {

          es ezunrestrict event_var(userid) usp

       }

    }

ES:
    // Restrict the m4a1 and the ak47 from players without

    // [SD] in their name

    event player_activate

    {

       if ("[SD]" notin event_var(es_username)) do

       {

          es ezrestrict event_var(userid) m4a1

          es ezrestrict event_var(userid) ak47

       }

    }



    event player_changename

    {

       if ("[SD]" in event_var(es_username)) do

       {

          es ezunrestrict event_var(userid) m4a1

          es ezunrestrict event_var(userid) ak47

       }

       else do

       {

          es ezrestrict event_var(userid) m4a1

          es ezrestrict event_var(userid) ak47

       }

    }

Each section of code is a standalone script.


User avatar
Professor
Professor
Profile

Posts: 1877
Location:
Erionville
 
New postPosted: 2007-07-12, 9:19 am 

i was wondering when you would make a restricting script nice work.

_________________
Image

Nacht der lebenden Toten


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-07-12, 3:33 pm 

lol! So was I... :P

Thanks! You know feedback or suggestions are always welcome! :)
- Dave


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-07-12, 7:21 pm 

I'm sorry for the somewhat false start on this script, but this second release was quite necessary.

The weapon tags should come in handy and the script logic has been updated.

Again, thoughts or suggestions are welcome!
- Dave


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-07-13, 10:33 pm 

I know it's somewhat comical to keep updating this script without any feedback, but at least I'm having fun! :P

Here is an example of using the events new to release 3:
ES:
    event ezrestricted_pickup

    {

    // When a player attempts to pick up a restricted weapon, echo player and weapon information

    // to the server console and remove the weapon.



       es echo event_var(es_username) of event_var(es_steamid) tried to pick up a restricted event_var(weapon)

       es_remove event_var(weaponindex)

    }



    event ezrestrict_player

    {

    // When a player is restricted from a weapon, remove all idle weapons of that type from the map



       es ezrestrict_removeidle event_var(weapon)

    }



    event ezunrestrict_player

    {

    // When a player is unrestricted from the awp, alert all players



       if (event_var(weapon) equalto weapon_awp) do

       {

          es_xset temp_string 0

          es_format temp_string "#lightgreenLook out! #green%1 #defaultcan now use the#green %2#default!" event_var(es_username) event_var(longname)

          es_msg #multi server_var(temp_string)

       }

    }

If you'd like to provide feedback or suggestions, I would be grateful. :D

- Dave

Edit-- Updated for release 4.


Last edited by SuperDave on 2007-10-22, 8:19 am, edited 1 time in total.

User avatar
Professor
Professor
Profile

Posts: 1877
Location:
Erionville
 
New postPosted: 2007-07-13, 10:36 pm 

lol its a good script just not interesting one i guess

_________________
Image

Nacht der lebenden Toten


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-07-13, 10:45 pm 

lol! That's right. I should think positive! :P

And you're right, one word that certainly does not describe this script is interesting :lol:

Thanks for your feedback, past and present!


User avatar
Reader
Profile

Posts: 77
 
New postPosted: 2007-08-02, 10:22 pm 

We ran this on our server last night in hopes to restrict to just the knife. I added the following commands to my script to kick off a knife based round once a team got so many wins in a row. When it kicked off the follwing commands, in this order, the server totally crashed. We are running the latest 1.5beta along with the latest mani, but nothing more.

The commands that were used were the following in sequence:

ezrestrict #all #all
ezrestrict_removeidle #all
ezunrestrict #all knife

The objective was to restrict all weapons in a round_end event with exception of the knife until the end of the next round_end event. Any idea what's up?


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-08-03, 5:31 am 

I thought I had that worked out...

It happens when it tries to remove a weapon that doesn't exist (it ends up removing... er... the world--basically).

I'll look into it, thanks!

_________________
Image
EventScripts Wiki --- #eventscripts --- Python.org --- es_install FAQ


User avatar
Reader
Profile

Posts: 77
 
New postPosted: 2007-08-03, 10:16 am 

LOL - well, it removed our world for sure!

Thx for checking into it.


User avatar
Newbie
Profile

Posts: 37
 
New postPosted: 2007-09-14, 11:01 pm 

Hey Great Mod, very useful, but it does have some bugs.

I noticed that when people join the server, they are not subject to the same restrictions that everyone else is.

Though I have very little knowledge of how this script actually works, it's a guess of mine that when players connect to the server they are not added to the correct group (#all, #ct, #t, etc.)

I noticed there was no event for player_connect, so even though individual restrictions would wear off, the group restirctions wouldnt)

I would really appreciate if you could look into this, or at least point in the right direction so i may fix it myself.

Thanks!


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-09-15, 1:48 am 

Carlsagan43 wrote:
...but it does have some bugs.
Hopefuly not billions and billions :P

Carlsagan43 wrote:
Though I have very little knowledge of how this script actually works, it's a guess of mine that when players connect to the server they are not added to the correct group (#all, #ct, #t, etc.)
Well, there aren't groups of players. When you use a # command it simply loops through all connected players that fit the tag you specified.

I just started on the next version of this script and using player "groups" is something I have considered. We'll see how it goes :wink:

Carlsagan43 wrote:
I noticed there was no event for player_connect, so even though individual restrictions would wear off, the group restirctions wouldnt)
I'm not sure what you mean by this. Could you clarify? :)

Thanks for the kind words,

- Dave

_________________
Image
EventScripts Wiki --- #eventscripts --- Python.org --- es_install FAQ


User avatar
Newbie
Profile

Posts: 37
 
New postPosted: 2007-09-15, 2:21 am 

The problem is that if a player was to leave the game and then immeadiately rejoin, that player would not be affected by the restrictions at all.


For example, I restricted AWPs for a certain map. When I leave the server, and immeadiately rejoin, I am able to buy AWPs while the other players are still restricted.

Since you know your code far better than I do, perhaps you could look into why this happens. Since this is my first night looking at event scripts, I am not fully able to solve the problem on my own.

Quote:
Hopefuly not billions and billions


I can't believe someone noticed!


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-09-15, 2:41 am 

Again, the problem is that only connected players can be restricted. Once a player disconnects all the corresponding restriction data is discarded. I currently have no plans to change this so be aware you will have to compensate for this in your scripts.

However, I do plan on implementing team restrictions so that if the awp is restricted from a team that restriction also applies to connecting players.

Let me know if you have any other thoughts or suggestions!

_________________
Image
EventScripts Wiki --- #eventscripts --- Python.org --- es_install FAQ


User avatar
Newbie
Profile

Posts: 37
 
New postPosted: 2007-09-15, 12:01 pm 

By compensate, what do you mean?

Could you at least point me in the right direction on how to re add the restriction data when new players join? It seems as though only
Code:
es_keydelete ezrestrict_player_keygroup event_var(userid)


is deleted. When I try to re add that info when players connect, it doesn't work.


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-09-15, 1:26 pm 

I would not suggest changing restrictions using the keygroup. At player_connect, simply use the ezrestrict command to add restrictions to the connecting player.

I have several examples above you might want to look at including:
SuperDave wrote:
ES:
    // Restrict the awp from all players
    event player_activate
    {
       es ezrestrict event_var(userid) awp
    }

Hope this helps!

_________________
Image
EventScripts Wiki --- #eventscripts --- Python.org --- es_install FAQ


User avatar
Newbie
Profile

Posts: 55
 
New postPosted: 2007-09-15, 6:40 pm 

i have a rcon vote for awp yes or no.. if they vote no than the command ma_restrict awp will be executed. if that happenz, are the ppl still able to buy an awp with this script here?

duz it work together?


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page 1, 2, 3, 4  Next


Who is online

Users browsing this forum: zloykif and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group