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

[CS:S][REQ] No block only at spawn with timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Misterpown
Senior Member
Join Date: Jan 2011
Old 09-30-2013 , 06:25   [CS:S][REQ] No block only at spawn with timer
Reply With Quote #1

Hello,

I want a simple plugin which allows the collision of players enter them when they spawn, this with a timer of 20 seconds, after 20 seconds no block is disabled.

Thank you.
Misterpown is offline
cREANy0
SourceMod Donor
Join Date: Jul 2012
Location: Germany
Old 09-30-2013 , 09:27   Re: [CS:S][REQ] No block only at spawn with timer
Reply With Quote #2

Use this Noblock plugin:
https://forums.alliedmods.net/showthread.php?p=462813

And this Plugin for Time:

Code:
#pragma semicolon 1
#include <sourcemod>

public Plugin:myinfo =
{
	name = "Disable Noblock after 20 seconds",
	author = "cREANy0",
	description = "Set cvar "sm_noblock" to 0",
	version = "1.0",
	url = "www.sourcemod.net"
};

public OnPluginStart()
{
	HookEvent("round_start", Event_RoundStart);	
}

public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
	CreateTimer(1.0, Timer_RoundStart_NB_ACTIVE);
	CreateTimer(20.0, Timer_RoundStart_NB_INACTIVE);
	return Plugin_Continue;
}

public Action:Timer_RoundStart_NB_ACTIVE(Handle:timer, any:client)
{
	
	ServerCommand("sm_noblock 1");	
	return Plugin_Stop;
}

public Action:Timer_RoundStart_NB_INACTIVE(Handle:timer, any:client)
{
	
	ServerCommand("sm_noblock 0");	
	return Plugin_Stop;
}
Hard coded but should work.

greetz cREANy0
Attached Files
File Type: sp Get Plugin or Get Source (noblock_time.sp - 161 views - 805 Bytes)
__________________

Last edited by cREANy0; 09-30-2013 at 09:29.
cREANy0 is offline
Misterpown
Senior Member
Join Date: Jan 2011
Old 09-30-2013 , 09:41   Re: [CS:S][REQ] No block only at spawn with timer
Reply With Quote #3

Thanks for your help, but I want all in one plugin, and not event roundstart but event player spawn.

Can you do it please ?
Thx a lot
Misterpown is offline
AlfredSpain
Senior Member
Join Date: Oct 2010
Old 10-03-2013 , 14:38   Re: [CS:S][REQ] No block only at spawn with timer
Reply With Quote #4

error on compile
__________________
AlfredSpain is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 10-04-2013 , 02:49   Re: [CS:S][REQ] No block only at spawn with timer
Reply With Quote #5

Quote:
Originally Posted by AlfredSpain View Post
error on compile
Fixed

PHP Code:
#pragma semicolon 1
#include <sourcemod>


public Plugin:myinfo =
{
    
name "Disable Noblock after 20 seconds",
    
author "cREANy0",
    
description "Set cvar sm_noblock to 0",
    
version "1.0",
    
url "http://www.sourcemod.net/"
};

public 
OnPluginStart()
{
    
HookEvent("round_start"Event_RoundStart);    
}

public 
Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
    
CreateTimer(1.0Timer_RoundStart_NB_ACTIVE_TIMER_FLAG_NO_MAPCHANGE);
    
CreateTimer(20.0Timer_RoundStart_NB_INACTIVE_TIMER_FLAG_NO_MAPCHANGE);
    return 
Plugin_Continue;
}

public 
Action:Timer_RoundStart_NB_ACTIVE(Handle:timer)
{
    
    
ServerCommand("sm_noblock 1");    
    return 
Plugin_Stop;
}

public 
Action:Timer_RoundStart_NB_INACTIVE(Handle:timeR)
{
    
    
ServerCommand("sm_noblock 0");    
    return 
Plugin_Stop;

__________________
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
AlfredSpain
Senior Member
Join Date: Oct 2010
Old 10-04-2013 , 06:08   Re: [CS:S][REQ] No block only at spawn with timer
Reply With Quote #6

Thx for the fix fran.

The main problem with this is that when the time of noblock, there is a risk that often sticking two players per match right then on the spot.
__________________

Last edited by AlfredSpain; 10-04-2013 at 06:08.
AlfredSpain 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 19:58.


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