Raised This Month: $51 Target: $400
 12% 

JailDoors


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ProfD
Junior Member
Join Date: Jul 2013
Plugin ID:
3858
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    it can open automatic the cells
    Old 08-28-2013 , 12:47   JailDoors
    Reply With Quote #1

    Hello i made this plugin for the jail servers only. this plugin it can help more the t`s to dont wait the ct`s to open the cells from the button. this plugin is working with X time and then it open the cells automatically. I create this plugin with a small help from Bibihotz. You can test it in your own server.


    jaildoors.smx jaildoors.sp
    ProfD is offline
    Bibihotz
    AlliedModders Donor
    Join Date: Jul 2013
    Old 08-28-2013 , 12:56   Re: JailDoors
    Reply With Quote #2

    i love you prof cause you upload it finally

    Last edited by Bibihotz; 08-28-2013 at 12:57.
    Bibihotz is offline
    Dkmuniz
    Senior Member
    Join Date: Jun 2013
    Old 08-28-2013 , 13:38   Re: JailDoors
    Reply With Quote #3

    public Action:OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
    {
    jbDoor = 28;
    CreateTimer(1.0, AutojaildoorOpen, _, TIMER_REPEAT);
    }

    28 is the time for doors open ?
    Dkmuniz is offline
    Bibihotz
    AlliedModders Donor
    Join Date: Jul 2013
    Old 08-28-2013 , 13:41   Re: JailDoors
    Reply With Quote #4

    yes it is the time to open the cells you can change the time for example 40

    Last edited by Bibihotz; 08-28-2013 at 13:42.
    Bibihotz is offline
    Dkmuniz
    Senior Member
    Join Date: Jun 2013
    Old 08-28-2013 , 19:53   Re: JailDoors
    Reply With Quote #5

    You can add for when one Ct open de "jaildoors" , the plugin stay off, ?
    Dkmuniz is offline
    Bibihotz
    AlliedModders Donor
    Join Date: Jul 2013
    Old 08-29-2013 , 03:56   Re: JailDoors
    Reply With Quote #6

    Quote:
    Originally Posted by Dkmuniz View Post
    You can add for when one Ct open de "jaildoors" , the plugin stay off, ?
    i try to do this with prof.D
    Bibihotz is offline
    rodrigo286
    Veteran Member
    Join Date: Sep 2010
    Location: Brazil, São Paulo
    Old 08-29-2013 , 07:54   Re: JailDoors
    Reply With Quote #7

    Add a cvar to control timer is better.

    Organize and ident your code is a bit confusing.

    If you need help, comment.

    Regards
    __________________
    My Plugins | VIEW HERE | I accept private requests, send me a PM.
    Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
    Meet the Medic | Disguise Expert | Crazy Jet

    CZSBrasil TEAM
    rodrigo286 is offline
    fanta2go
    Junior Member
    Join Date: Oct 2013
    Old 10-20-2013 , 09:03   Re: JailDoors
    Reply With Quote #8

    Pls help me with the Plugin!

    The plugin is nice, but the timer is rlly bad.

    Sometimes the timer jump from 29 directly to 27.

    And pls turn off the sound for every second, 29...28....27....26.

    The sound at last if the jail will open is enough xD!

    pls help

    Last edited by fanta2go; 10-20-2013 at 09:03.
    fanta2go is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 10-20-2013 , 09:35   Re: JailDoors
    Reply With Quote #9

    Quote:
    Originally Posted by fanta2go View Post
    Pls help me with the Plugin!

    The plugin is nice, but the timer is rlly bad.

    Sometimes the timer jump from 29 directly to 27.

    And pls turn off the sound for every second, 29...28....27....26.

    The sound at last if the jail will open is enough xD!

    pls help
    Try this https://forums.alliedmods.net/showth...64#post2049064
    __________________
    Veteran Coder -> Activity channel
    Coding on CS2 and taking paid and free jobs.

    Contact: Steam, Telegram or discord ( franug ).

    You like my work? +Rep in my steam profile comments or donate.

    Franc1sco is offline
    Send a message via MSN to Franc1sco
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 10-20-2013 , 10:26   Re: JailDoors
    Reply With Quote #10

    This is what I use for my Jailbreak server:
    Code:
    public Action:Command_Open(client, args)
    {
        if(!IsValidClient(client))
        {
            return Plugin_Handled;
        }
        
        if(!IsPlayerAlive(client) && !CheckCommandAccess(client, "cell_open", ADMFLAG_GENERIC))
        {
            ReplyToCommand(client, "%s You can't open the cells when you're dead.", PREFIX);
            
            return Plugin_Handled;
        }
        
        if(GetClientTeam(client) != CS_TEAM_CT && !CheckCommandAccess(client, "cell_open", ADMFLAG_GENERIC))
        {
            ReplyToCommand(client, "%s You are not allowed to perform this command since you're not a prison guard or an admin.", PREFIX);
            
            return Plugin_Handled;
        }
        
        if(gB_CellsAreOpen)
        {
            ReplyToCommand(client, "%s Well, it looks like the cells are already open.", PREFIX);
            
            return Plugin_Handled;
        }
        
        new bool:Success;
        
        static gI_Entity;
        
        gI_Entity = -1;
        
        while((gI_Entity = Entity_FindByClassName(gI_Entity, "func_door")) != INVALID_ENT_REFERENCE)
        {
            new String:name[32];
            Entity_GetName(gI_Entity, name, 32);
            
            if(StrContains(name, "cell", false) != -1 || StrContains(name, "cage", false) != -1 || StrContains(name, "prison", false) != -1 || StrContains(name, "open", false) != -1 || StrContains(name, "taim", false) != -1 || StrContains(name, "jaildoor", false) != -1 || StrEqual(name, "c1", false))
            {
                AcceptEntityInput(gI_Entity, "Open");
                
                Success = true;
            }
        }
        
        gI_Entity = -1;
        
        while((gI_Entity = Entity_FindByClassName(gI_Entity, "func_button")) != INVALID_ENT_REFERENCE)
        {
            new String:name[32];
            Entity_GetName(gI_Entity, name, 32);
            
            if(StrEqual(gS_Currentmap, "jb_vipinthemix_v1_2", false))
            {
                if(Entity_GetHammerId(gI_Entity) == 40045)
                {
                    AcceptEntityInput(gI_Entity, "Use");
                    
                    Success = true;
                }
            }
            
            else if(StrContains(name, "cell", false) != -1 || StrContains(name, "cage", false) != -1 || StrContains(name, "prison", false) != -1 || StrContains(name, "open", false) != -1 || StrContains(name, "taim", false) != -1 || StrContains(name, "jaildoor", false) != -1)
            {
                AcceptEntityInput(gI_Entity, "Use");
                
                Success = true;
            }
        }
        
        gB_CellsAreOpen = Success;
        
        if(Success)
        {
            ReplyToCommand(client, "%s You have opened the cells.", PREFIX);
            
            PrintToChatAll("%s \x074A4A4A%N\x01 has opened the cells!", PREFIX, client);
        }
        
        else
        {
            ReplyToCommand(client, "%s Welp, it looks like this map is not supported. Report to \x074A4A4Ashavit\x01.", PREFIX);
        }
        
        return Plugin_Handled;
    }
    It supports most of the maps.
    __________________
    retired
    shavit 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 00:19.


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