Raised This Month: $ Target: $400
 0% 

RoundEnd simple plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jozzz
Member
Join Date: May 2012
Old 08-11-2012 , 17:34   RoundEnd simple plugin
Reply With Quote #1

Hello, I was wondering if someone could help me to make a simple plugin that executes a server command when a round ends in a regular cs game. The command is this: "bot_stop 1" or it could be: sv_alltalk, sv_voiceenable, etc. just to give you an idea.

Last edited by jozzz; 08-11-2012 at 17:45.
jozzz is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 08-11-2012 , 17:46   Re: RoundEnd simple plugin
Reply With Quote #2

PHP Code:
#include < amxmodx >

public plugin_init( )
{
    
register_plugin"new round""1.0.0""guipatinador" )
    
    
register_event"HLTV""event_new_round""a""1=0""2=0" )  
}

public 
event_new_round( )
{
    
server_cmd"sv_alltalk 1" )
    
// more code here    


Last edited by guipatinador; 08-11-2012 at 17:47.
guipatinador is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-11-2012 , 17:51   Re: RoundEnd simple plugin
Reply With Quote #3

Quote:
Originally Posted by guipatinador View Post
PHP Code:
#include < amxmodx >

public plugin_init( )
{
    
register_plugin"new round""1.0.0""guipatinador" )
    
    
register_event"HLTV""event_new_round""a""1=0""2=0" )  
}

public 
event_new_round( )
{
    
server_cmd"sv_alltalk 1" )
    
// more code here    

Just to clarify, this is when a new round is initiated and not when the round ends.
__________________
fysiks is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 08-11-2012 , 17:53   Re: RoundEnd simple plugin
Reply With Quote #4

Well, today I'm blind...

PHP Code:
#include < amxmodx >

public plugin_init( )
{
    
register_plugin"new round""1.0.0""guipatinador" )
    
    
register_logevent"logevent_round_end"2"1=Round_End" )
}

public 
logevent_round_end( )
{
    
server_cmd"sv_alltalk 1" )
    
// more code here    

More info https://forums.alliedmods.net/showthread.php?t=42159

EDIT: jozzz edited his post!!! I saw new round !

Last edited by guipatinador; 08-11-2012 at 17:54.
guipatinador is offline
CS-A-Roland
Member
Join Date: Jul 2009
Old 08-12-2012 , 08:32   Re: RoundEnd simple plugin
Reply With Quote #5

Mhm... thats interesting for me!
Is it possible to turn of a plugin with this at "map end"?!

And when it could work, how i could realise to turn it on again after the first round of the new map?!
(because you get the event round end also so i think it should also works to check if the "first" round of a map ends?!

Thanks by the way for explanation...
__________________
oOOOoooh it's www.Cs-Attack.de
New World of Warcraft Mod Beta 0.5(based on WC3FT 3.5)
Counterstrike 1.6 SERVER:
Server IP: 193.192.58.154:27200

CONDITION ZERO SERVER:
Server IP: 193.192.58.154:27016
CS-A-Roland is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-12-2012 , 18:08   Re: RoundEnd simple plugin
Reply With Quote #6

You can "pause" plugins but there is no reason to pause a plugin at the end of a map since the map is over.
__________________
fysiks is offline
CS-A-Roland
Member
Join Date: Jul 2009
Old 08-13-2012 , 06:48   Re: RoundEnd simple plugin
Reply With Quote #7

I know atm 2 reasons to test something like that, first is there are a plugin to big and loads to much stuff wich crash the server at mapchange!
Then a Plugin got a broken database funktion, there its also helpful to stop its work before it crash the server.

The nicest way to do would, if possible, creating cvars where the server admin can tell the plugin wich do it to stop or pause another in seconds. So the admin also can test at wich point the bug of the not stable plugin attacks and get more information about "where" he have to search...
Also it could be nice at the mapstart, to see if a plugin loads to much at wich point exactly he says "its to much... error"

Its just a "fast" idea, dont know if this could work, but for me it sounds interesting...
__________________
oOOOoooh it's www.Cs-Attack.de
New World of Warcraft Mod Beta 0.5(based on WC3FT 3.5)
Counterstrike 1.6 SERVER:
Server IP: 193.192.58.154:27200

CONDITION ZERO SERVER:
Server IP: 193.192.58.154:27016
CS-A-Roland is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-13-2012 , 19:01   Re: RoundEnd simple plugin
Reply With Quote #8

You can't prevent a plugin from loading using a cvar. The plugins will already be loaded before the cvars are checked. As far as debugging, you should simply disable plugins in plugins.ini to find the one that is crashing the server.
__________________

Last edited by fysiks; 08-13-2012 at 19:09.
fysiks is offline
CS-A-Roland
Member
Join Date: Jul 2009
Old 08-16-2012 , 08:50   Re: RoundEnd simple plugin
Reply With Quote #9

Mhm, i know wich it is! It was just an idea to let it run without watching the server all 30 minutes if he is down. And also it would be a nice workaround for a longer time, while fixing a problem like these plugin have, take a longer time...
__________________
oOOOoooh it's www.Cs-Attack.de
New World of Warcraft Mod Beta 0.5(based on WC3FT 3.5)
Counterstrike 1.6 SERVER:
Server IP: 193.192.58.154:27200

CONDITION ZERO SERVER:
Server IP: 193.192.58.154:27016
CS-A-Roland 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 05:43.


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