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

Jailbreak doors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zyten
Senior Member
Join Date: Jan 2018
Old 04-23-2018 , 04:47   Jailbreak doors
Reply With Quote #1

I need plugin to open jailbreak doors automaticly after cretain amount of time

Last edited by Zyten; 07-19-2018 at 18:08.
Zyten is offline
potatoz
AlliedModders Donor
Join Date: Nov 2016
Old 04-23-2018 , 11:14   Re: Jailbreak doors
Reply With Quote #2

This should do the trick (keep in mind that it requires Smart Jail Doors to work)

May be configured through following cvar:
sjd_auto_open_time "20" - How long after round start to open cell doors automatically (if configured), in seconds
Attached Files
File Type: smx sjd_auto_open.smx (4.6 KB, 200 views)
File Type: sp Get Plugin or Get Source (sjd_auto_open.sp - 263 views - 683 Bytes)
__________________
potatoz is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 04-23-2018 , 16:31   Re: Jailbreak doors
Reply With Quote #3

thx m8 can u add if there is no ct its open right away
Zyten is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 04-26-2018 , 07:15   Re: Jailbreak doors
Reply With Quote #4

seems like myjailbreak has that door thing i just didnt figure out i need to save doors to sjd. i need thou the one that open right away if there is no one on ct team
Zyten is offline
potatoz
AlliedModders Donor
Join Date: Nov 2016
Old 04-30-2018 , 17:15   Re: Jailbreak doors
Reply With Quote #5

this should do it, untested though
Attached Files
File Type: smx sjd_auto_open.smx (4.8 KB, 234 views)
File Type: sp Get Plugin or Get Source (sjd_auto_open.sp - 249 views - 868 Bytes)
__________________

Last edited by potatoz; 04-30-2018 at 17:15.
potatoz is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 04-30-2018 , 17:56   Re: Jailbreak doors
Reply With Quote #6

thx man that plugin is best

u should share it on plugin section

Last edited by Zyten; 04-30-2018 at 17:56.
Zyten is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 07-19-2018 , 18:02   Re: Jailbreak doors
Reply With Quote #7

Hi can you add 5 sec delay before check if there is no one at ct?

i have had problem that sometimes its opens cells even there is cts
Zyten is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-20-2018 , 03:58   Re: Jailbreak doors
Reply With Quote #8

I would do like this, (haven't even tried to compile so don't blame me if anything is wrong lol)
PHP Code:
#include <sourcemod>
#include <smartjaildoors>

#pragma semicolon 1

ConVar g_cvTimer;

bool g_bCheck;

public 
void OnPluginStart()
{
    
HookEvent("round_start"Event_Start);
    
    
g_cvTimer CreateConVar("sm_cvar_name""20");
}

public 
Action Event_Start(Event hEvent, const char[] sNamebool bDontBroadcast)
{
    if (
g_bCheck)
    {
        if (
GetTeamClientCount(3) != 0)
        {
            
CreateTimer(g_cvTimer.IntValue 1.0Timer_Doors);
        }
        
        
g_bCheck false;
    }
}

public 
Action Timer_Doors(Handle hTimer)
{
    
SJD_OpenDoors();
    
    
g_bCheck true;
    
    return 
Plugin_Continue;


Last edited by mug1wara; 07-26-2018 at 17:33.
mug1wara is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 07-21-2018 , 16:15   Re: Jailbreak doors
Reply With Quote #9

Quote:
Originally Posted by mug1wara View Post
I would do like this, (haven't even tried to compile so don't blame me if anything is wrong lol)
PHP Code:
ConVar g_cvTimer CreateTimer("sm_cvar_name""20.0"""); 
g_cvTimer should be a global handle. Also, you should be setting it equal to CreateConVar.

Last edited by ThatKidWhoGames; 07-21-2018 at 16:17.
ThatKidWhoGames is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-21-2018 , 18:11   Re: Jailbreak doors
Reply With Quote #10

Yeah, edited code. Better now.
mug1wara 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:15.


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