Page 4 of 7 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 68

Thread: Anti-Door Block

  1. #31
    Administrator JoTo's Avatar
    Join Date
    May 2010
    Location
    www.scapp.net
    Posts
    1,953

    Default

    The anti door block script should work fine, it probably needs some fine tuning regarding coordinates.

  2. #32

    Default

    so what would you need to change so it will keep players from standing in front of a closed door? and make it move you sooner? I tried it and it seems players can stand in the door too long before moving them.

  3. #33

    Default

    The script on post#24 works great, thank you Armageddon.
    Is it possible to push or kill players who stand in a specific area for too long ? There are doorways where the doors always stay open so the doorblock.pk3 does not work.Unfortunately these are the areas where doorblockers always stand and if there is no admin everybody gets mad.I don't trust people with using the voting system to kick others because it didn't work well last time.

    Those are the doors I'm talking about.Destroyed Village and Algiers.


    Last edited by User45; August 4th, 2013 at 02:28 PM.
    Camp another day.
    Barbarossa

  4. #34

    Default

    The easiest solution would be to turn Friendly Fire on and just blast them!

    Or maybe an anti-camp mod?
    Last edited by Midnight1138; August 4th, 2013 at 02:49 PM.

  5. #35

    Default

    Enabling friendly fire and anti-camp would create chaos on our server so I excluded those options from the beginning x)
    Does Elgan's anti-camper mod have the ability to detect campers in/around specific coordinates?
    Camp another day.
    Barbarossa

  6. #36
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    You can add your own coords to the array used in each map

    Open up the doorblocks scr of the map you want ie global/doorblock/dm_mohdm7
    In it you will see an array with multiple coords in it , just add any coords you want, those of the above positions you wanted in the doorways , and it should work.

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  7. #37

    Default

    I put a wrong coordinates that's why it didn't work the first time.It works now.Thanks !
    Camp another day.
    Barbarossa

  8. #38

    Default

    I have another question.Currently the script pushes the player after he blocks the door for about 3 seconds.Is it possible to extend this period to something like 6 seconds ? I tried placing a timer in doorblock.scr and map.scr but they didn't work.

    in the doorblock/doorblock.scr file , right below the first line that says "doorBlock: {" I added "wait 3" and that extended the time allowed to block the door by 3 seconds.Hopefully this won't cause any problems or buffer overflow e.t.c
    Camp another day.
    Barbarossa

  9. #39
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    Hi

    I know this is old but it is always useful to have on a server

    I was experimenting around with rotating doors before , and thought i could use some of it to update this mod, so here it is now

    Below is a new UPDATED version of the doorblock script by Stranter, it now does not need any other scripts or map specific scripts, it now grabs the coords for every door ( func_rotatingdoor) from the map as it loads, so this can be exec from dmprecache.scr ,

    So to summarize updated version

    • Only need the ONE script , not the multiple ones like before
    • you do NOT need to add custom maps , will find coords automatically.
    • executed from dmprecache.scr


    Save and load as global/doorblock.scr or similar
    Code:
    /*
        Doorblock Detection
        v1 : 22 May 2010
        
        Base function
        Original Mod By : Stranter
        
        UPDATED
        v2 : 27 April 2014
        By : Purple Elephant
        
        Notes on v2:
        
        Now a Global script , can be called from dmpreache, it will find the coords of the doors AUTOMATICALLY!!!! , 
        does not require different map specific scripts
        
        REQUIRES : Latest Version of Reborn Patch 1.12 for AA 
    >> http://www.x-null.net/forums/forumdisplay.php?82-1-12-RC3-Patch << 
    for the getentity command
    
        
        Credits:
        Stranter : For original Mod
        Purple Elephant : For updating mod for use globally without the need to grab coords from custom maps
        Sor: For a little MoveAway script he wrote that i found on xnull 
        
    */
    main:
    
    level waittill spawn 
    
    local.doorArray = waitthread get_doors
    
    for(local.i = 1; local.i <= local.doorArray.size; local.i++) 
        {
            local.door = spawn trigger_multiple
            local.door.origin = ((local.doorArray[local.i][1]) - ( 0 0 40 ))
            local.door.angle = local.doorArray[local.i][2]
            local.door setsize ( -20 -20 -0 ) ( 20 20 0 )
            local.door setthread doorBlock
            
            wait 1
        }
    end
    
    /// Gets all func_rotatingdoors on the map , made by Purple Elephant
    get_doors:
    
    /// Min is sv_maxclients, can be 1 , but this is slightly quicker because lower numbered entities are reserved for players
    local.min = int(getcvar(sv_maxclients))
    // Max is found by spawning a dummy model and getting its entnum
    local.dummy = spawn script_model model "fx/dummy.tik" origin ( 0 0 -1000 )
    local.max = int(local.dummy.entnum)
    
    local.j = 0
    
    for(local.i = local.min;local.i <= local.max;local.i++)
    {
        local.ent = getentity local.i
        
        if(local.ent != NULL)
        {
            if(local.ent.classname == "RotatingDoor")
            {
            local.j++
            
            local.array[local.j][1] = local.ent.origin
            local.array[local.j][2] = local.ent.angle
            
            }
        }
        
        waitframe
    }
    
    end local.array
    
    /// This part thanks to Stranter for original , edited by Purple Elephant
    doorBlock:
    
    local.player = parm.other
        
    if!(local.player.blockState)
    {
        local.player.blockState = 1
        local.isBlocking = vector_within local.player.origin self.origin 50
        local.blockCount = 0
        while((isalive local.player) && (local.isBlocking) && (local.player.blockState)&& local.player.dmteam != "spectator")
        {
            local.isBlocking = vector_within local.player.origin self.origin 50
            wait 0.1
            local.blockCount++
            
            /// If player pressed use  (ie not blocking anymore or not trying to , could be blocked from other side)
            //  resets counter
    
            if(local.player.useheld)
            local.blockCount = 0
            
            ///When blockcount reaches 30 , sends away
            if(local.blockCount > 30)
            {
                local.player iprint "You were door blocking"        
                local.player waitthread MoveAway        
                local.player.blockState = 0    
                end
            }
        }
        local.player.blockState = 0
    }
    
    end
    
    //// This part thanks to Sor, edited alittle :P  
    MoveAway:
        local.origin = (self gettagposition "eyes bone");
        local.rad = 30;
        local.move = "back"
        
        if ((sighttrace local.origin (local.origin + (self.forwardvector * local.rad))1) ) {
            local.move = "forward";
        }
        else if ((sighttrace local.origin (local.origin + ((self.forwardvector * -1) * local.rad))1) ) {
            local.move = "back";
        }
        else if ((sighttrace local.origin (local.origin + (self.leftvector * local.rad))1) ) {
            local.move = "moveleft";
        }
        else if ((sighttrace local.origin (local.origin + (self.rightvector * local.rad))1) ) {
            local.move = "moveright";
        }
        
    
        self stufftext ("+" + local.move);
        wait (randomfloat(0.5) + 0.5); //random [0.5; 1.0] interval to wait;
        self stufftext ("-" + local.move);
    end;

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  10. #40

    Default

    Always nice to have!

    Thanks for sharing this with us, Purple!

    +1 Rep

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •