Raised This Month: $32 Target: $400
 8% 

[L4D] Restricted Zones


Post New Thread Reply   
 
Thread Tools Display Modes
Author
djromero
Senior Member
Join Date: Dec 2008
Location: Maracaibo, Venezuela
Plugin ID:
719
Plugin Version:
1.1.2
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Make restricted zones inside a map, so survivors can't get in.
    Old 01-11-2009 , 17:21   [L4D] Restricted Zones
    Reply With Quote #1

    This plugin allows you to define specific locations as restricted zones for the Survivors in L4D. You can define up to 10 locations for each map.

    This was meant for places like the closet near the elevator in the No Mercy Hospital, or under the Ramp on the finale of the same campaign.

    For each zone you need to indicate the exact coordinates (by moving your "survivor" to it) and then indicate the location you want the player moved to when it reaches the restricted zone. You can't define a "move to" location that's within the restricted zone.

    NOTES:
    * There's no default restricted zones included with the plugin.
    * Root access is requiered to execute the commands.


    Commands:

    rz_storeloc [radious]
    It stores the current player's location as a restricted zone. Radious is optional. Default value is 50. After this command, you have to indicate the "move-to" location by using the rz_storemoveto command.

    rz_storemoveto
    Stores the 'move-to' location for last restricted zone stored. Only after this command the restricted zone will be really stored. NOTE: New restricted zones become in effect right away, so you can test them.

    rz_deletenear [radious]
    It deletes all the restricted zones near the current location of the player. If radious is not provided, 100 is used as a default. It prints out all the deleted locations.

    rz_deleteall
    It deletes all the restricted zones for the current map.


    Change log:


    Version 1.0
    - Restrict 2 locations on 2 VS maps of the No Mercy campaign. Nothing more.

    Version 1.1
    - Fixed some issues about old restricted zones not being reset on a new map start if the map didn't have any restricted location.

    - Improved timer: Now the checks doesn't occur that often if the player is far away from any restricted spot. They become more often when the players get closer to a restricted spot. Original idea from: ChillyWI.

    - Timer is disabled on maps that doesn't have restricted zones.

    - Added commands to store/delete restricted zones.

    Version 1.1.1
    - Fixed some issues when loading .cfg file.
    - Uploaded 2 sample .CFG files (closet near elevator and ramp on finale).

    Version 1.1.2
    - Added public cvar.
    Attached Files
    File Type: cfg rz_l4d_vs_hospital04_interior.cfg (86 Bytes, 1478 views)
    File Type: cfg rz_l4d_vs_hospital05_rooftop.cfg (336 Bytes, 1079 views)
    File Type: sp Get Plugin or Get Source (L4DRestrictedZones.sp - 3756 views - 16.8 KB)

    Last edited by djromero; 01-30-2009 at 06:53. Reason: Upgraded to version 1.1.2
    djromero is offline
    {7~11} TROLL
    Senior Member
    Join Date: Oct 2008
    Location: Atlanta,Georgia
    Old 01-11-2009 , 17:40   Re: [L4D] Restricted Zones
    Reply With Quote #2

    sounds cool could use something like this on css
    __________________
    {7~11} TROLL is offline
    santaclaus
    Senior Member
    Join Date: Dec 2008
    Old 01-11-2009 , 19:19   Re: [L4D] Restricted Zones
    Reply With Quote #3

    That seem interesting ...
    __________________


    Last edited by santaclaus; 01-11-2009 at 19:22. Reason: i've just read the source
    santaclaus is offline
    wgooch
    Member
    Join Date: Dec 2008
    Old 01-11-2009 , 19:49   Re: [L4D] Restricted Zones
    Reply With Quote #4

    It sounds very useful, but could you provide more details on how it works? possible list the commands to block areas.
    wgooch is offline
    Shango
    Junior Member
    Join Date: Oct 2008
    Location: Britain
    Old 01-11-2009 , 19:50   Re: [L4D] Restricted Zones
    Reply With Quote #5

    Code:
     
    
        // We program a check function to execute every 500 milliseconds (1/2 of a second)
        CreateTimer(0.5, LocationCheckThread, _,TIMER_REPEAT);
    
    }
    Umm.. wouldn't this be a strain on the server? ie wouldn't it cause lag? i'm not sure on how resource taxing things like this are i'm just asking...
    __________________
    "Jees I'm bored, let's learn how to code for Sourcemod"
    STOP!
    MIND HURTING AHEAD
    "crap"
    Shango is offline
    wgooch
    Member
    Join Date: Dec 2008
    Old 01-11-2009 , 19:51   Re: [L4D] Restricted Zones
    Reply With Quote #6

    Quote:
    Originally Posted by Shango View Post
    Code:
     
    
        // We program a check function to execute every 500 milliseconds (1/2 of a second)
        CreateTimer(0.5, LocationCheckThread, _,TIMER_REPEAT);
    
    }
    Umm.. wouldn't this be a strain on the server? ie wouldn't it cause lag? i'm not sure on how resource taxing things like this are i'm just asking...

    The game is always checking what area that the player is in, so I don't think that this would cause much of a problem, but I'm really bad at this stuff so don't take my word for it.
    wgooch is offline
    Ydiss
    Member
    Join Date: Jan 2009
    Old 01-11-2009 , 20:23   Re: [L4D] Restricted Zones
    Reply With Quote #7

    I've been looking for something like this for a while. Will check it out tomorrow and let you know how it runs.

    Perhaps you could add a cfg file that lists the blocked locations by coordinates, to allow admins to remove or add areas they choose?

    Last edited by Ydiss; 01-11-2009 at 20:40.
    Ydiss is offline
    ChillyWI
    Senior Member
    Join Date: Aug 2008
    Old 01-11-2009 , 20:28   Re: [L4D] Restricted Zones
    Reply With Quote #8

    Very interesting, but we need more info. Does it kill people that enter those areas or just prevent them from getting in there in the first place? Are there configurable cvars to allow different behavior, like timing?
    ChillyWI is offline
    Ydiss
    Member
    Join Date: Jan 2009
    Old 01-11-2009 , 20:54   Re: [L4D] Restricted Zones
    Reply With Quote #9

    It doesn't work. Just tested it and ran right into the closet near the NM4 elevator, and went right under the ramp on NM5 finale.

    This was Coop.

    Can you give more information, please? How do you turn it on?
    Ydiss is offline
    Keamos
    Junior Member
    Join Date: Nov 2008
    Old 01-11-2009 , 23:57   Re: [L4D] Restricted Zones
    Reply With Quote #10

    Quote:
    Originally Posted by Ydiss View Post
    It doesn't work. Just tested it and ran right into the closet near the NM4 elevator, and went right under the ramp on NM5 finale.

    This was Coop.

    Can you give more information, please? How do you turn it on?
    The way it's written currently, it'll only work on VS.

    if (StrContains(MapName, "l4d_vs_hospital04_interior", false)==0)

    if (StrContains(MapName, "l4d_vs_hospital05_rooftop", false)==0)
    Keamos 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 21:03.


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