Raised This Month: $ Target: $400
 0% 

console commands on round start


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bobis
Senior Member
Join Date: Jun 2010
Location: Athens, Greece
Old 08-23-2011 , 17:51   console commands on round start
Reply With Quote #1

Hi!

I request a simple plugin for css (plugin.smx or sth like that) so at every round start , a console command would be triggered, for example "sv_alltalk 1" or "mp_friendlyfire 0"


Thank you!!!
bobis is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-24-2011 , 10:30   Re: console commands on round start
Reply With Quote #2

Would this satisfy you, execute config file ...cfg/round_start.cfg every round start ?

So you just add cvars what you want in round_start.cfg file with value
example
Code:
sv_alltalk 1
mp_friendlyfire 0
PHP Code:
public Plugin:myinfo 
{
    
name "Exec cfg/round_start.cfg file every round",
    
description "Execute config file every round start"
}

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

public 
round_start(Handle:event, const String:name[], bool:dontBroadcast)
{
    if(
FileExists("/cfg/round_start.cfg"false))
    {
        
ServerCommand("exec round_start.cfg");
    }

here > Compiler
__________________
Do not Private Message @me
Bacardi is offline
jungjunghoo
Senior Member
Join Date: Sep 2009
Old 08-24-2011 , 11:13   Re: console commands on round start
Reply With Quote #3

http://forums.alliedmods.net/showthread.php?t=164563
jungjunghoo is offline
bobis
Senior Member
Join Date: Jun 2010
Location: Athens, Greece
Old 09-22-2011 , 14:48   Re: console commands on round start
Reply With Quote #4

Hey , your plugin is good but it could be better if you were able to set the time delay for the command to be executed after round start , like in Eventscripts with es_delayed or sth like that.
bobis is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-22-2011 , 15:49   Re: console commands on round start
Reply With Quote #5

Quote:
Originally Posted by bobis View Post
Hey , your plugin is good but it could be better if you were able to set the time delay for the command to be executed after round start , like in Eventscripts with es_delayed or sth like that.
#6
__________________
Do not Private Message @me
Bacardi is offline
bobis
Senior Member
Join Date: Jun 2010
Location: Athens, Greece
Old 09-23-2011 , 16:39   Re: console commands on round start
Reply With Quote #6

Ok thank you , it worked

Now , i need also a plugin that triggers a command when a player spawns. ( I need it for a deathmatch server, thanks)
bobis is offline
Weasel
AlliedModders Donor
Join Date: Apr 2004
Location: Undisclosed / Secure
Old 06-21-2013 , 14:00   Re: console commands on round start
Reply With Quote #7

Quote:
Originally Posted by Bacardi View Post
Would this satisfy you, execute config file ...cfg/round_start.cfg every round start ?
So you just add cvars what you want in round_start.cfg file with value
example
Loving this by the way. Using a variant of this on my CSS server to kick-off a random music selection at the start of every round.
__________________
Pwease pardon by bad Engrish.
Steam Profile, Steam Group, Stats, Twitter

Last edited by Weasel; 06-21-2013 at 14:01. Reason: The Earth moved for me.
Weasel is offline
Weasel
AlliedModders Donor
Join Date: Apr 2004
Location: Undisclosed / Secure
Old 01-02-2015 , 13:12   Re: console commands on round start
Reply With Quote #8

Would this work on CS:GO also? or need any modification?
__________________
Pwease pardon by bad Engrish.
Steam Profile, Steam Group, Stats, Twitter
Weasel is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 01-02-2015 , 14:43   Re: console commands on round start
Reply With Quote #9

Quote:
Originally Posted by bobis View Post
Ok thank you , it worked

Now , i need also a plugin that triggers a command when a player spawns. ( I need it for a deathmatch server, thanks)
Hook to one of the player spawn events and bind the command to that event.

(You'll need to find a listing of events somewhere in the wiki - I only have the ones for TF2 bookmarked.)
Potato Uno 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 11:47.


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