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

Server Executes Command, say !stopmatch as soon as when it gets Empty


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-03-2016 , 19:31   Server Executes Command, say !stopmatch as soon as when it gets Empty
Reply With Quote #1

As The Title Itself Says
Server Executes Command, say !stopmatch as soon as when it gets Empty

Actually, I'm using Pimps Automix (Pug), but sometimes, server gets empty all of the sudden, match doesn't stop itself and creates problems for the one, who joins some minutes later as previous match remains continued and doesn't stops ..!! so, can anyone design a simple plugin? that

when server gets 0/10, server says a command (say !stopmatch)

if check_players "0" [Number Can Be Changed By Cvar {Add It, If Possible}(Default 0)]
then
say !stopmatch

Thanks Alot In Advance ..!!

Last edited by Alber9091; 12-03-2016 at 19:35.
Alber9091 is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-03-2016 , 20:24   Re: Server Executes Command, say !stopmatch as soon as when it gets Empty
Reply With Quote #2

Cant help but can see that you have a problem with auto mix plugin.
It should stop the match when 3 people leavs live match.
Try to search i think there are some plugins which might help you.
4ever16 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-04-2016 , 05:12   Re: Server Executes Command, say !stopmatch as soon as when it gets Empty
Reply With Quote #3

Quote:
Originally Posted by 4ever16 View Post
Cant help but can see that you have a problem with auto mix plugin.
It should stop the match when 3 people leavs live match.
Try to search i think there are some plugins which might help you.
Usually it does stops the match, but when all of the sudden everyone leaves, at that moment, not everytime, but sometimes, it doesn't stops the match in that condition ..!! + can you tell me those keywords, for search?

And anyone there? To help me out, who can make this simple plugin for me?

Last edited by Alber9091; 12-04-2016 at 05:12.
Alber9091 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-04-2016 , 10:46   Re: Server Executes Command, say !stopmatch as soon as when it gets Empty
Reply With Quote #4

Quote:
Originally Posted by 4ever16 View Post
Try to search i think there are some plugins which might help you.
Here are google search results from my side ..!! The only search related I can find is my own request ..!!

SS: http://imgur.com/ulDlf0t
Alber9091 is offline
iNdio
Senior Member
Join Date: Apr 2015
Location: Ro
Old 12-04-2016 , 16:42   Re: Server Executes Command, say !stopmatch as soon as when it gets Empty
Reply With Quote #5

Quote:
Originally Posted by Alber9091 View Post
match doesn't stop itself and creates problems for the one, who joins some minutes later as previous match remains continued and doesn't stops
No, plugin stops. The problem is that doesn't start a new one until the Center Huds Statistics disappear.

Quote:
Originally Posted by Alber9091 View Post
if check_players "0" [Number Can Be Changed By Cvar {Add It, If Possible}(Default 0)]
then
say !stopmatch
The plugin will "force" stop-match by "!stopmatch", you want a cvar, but instead of force command,
is better to use bottom public, cause I have an auto-mix server too. Thanks to Nubo & Bugsy, I have no more errors with this mode.

[1] Delete:

PHP Code:
public MatchIsOver()
{
    
set_pcvar_string(cvar_sv_password"")
    
set_task(1.0"restartServer"scanForTaskID())
}

public 
restartServer()
{
    
server_cmd("restart")

[2] Replace:

PHP Code:
public EndMatch() {
    
chat_color(0"!g%s %L"PREFIXLANG_PLAYER"MATCH_OVER2")
    
g_Restart true
    
    sortPoints
()
    
    if ( 
get_pcvar_num(cvar_Rankings) )
        
doRankings()
        
    new 
taskId scanForTaskID()
    
set_task(15.0"MatchIsOver"taskId)

with --->

PHP Code:
public EndMatch() {
    
chat_color(0"!g%s %L"PREFIXLANG_PLAYER"MATCH_OVER2")
    
g_Restart true
    
    sortPoints
()
    
    if ( 
get_pcvar_num(cvar_Rankings) )
        
doRankings()
        
    
set_task(10.0"MatchIsOver")
}

public 
MatchIsOver()
{
    
set_pcvar_string(cvar_sv_password"")
    
server_cmd("exec practice.cfg")
    
server_cmd("restart")

__________________
Where Cs had no value, amxx, sometimes, had its price...
iNdio is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-04-2016 , 18:20   Re: Server Executes Command, say !stopmatch as soon as when it gets Empty
Reply With Quote #6

Ah, Thanks, Will Try It ..!! Asap
But It Says, ColorChat, So I need Include Colorchat.inc?Right? :-D

Last edited by Alber9091; 12-04-2016 at 19:29.
Alber9091 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-04-2016 , 19:28   Re: Server Executes Command, say !stopmatch as soon as when it gets Empty
Reply With Quote #7

Quote:
Originally Posted by iNdio View Post
[2] Replace:

PHP Code:
public EndMatch() {
    
chat_color(0"!g%s %L"PREFIXLANG_PLAYER"MATCH_OVER2")
    
g_Restart true
    
    sortPoints
()
    
    if ( 
get_pcvar_num(cvar_Rankings) )
        
doRankings()
        
    new 
taskId scanForTaskID()
    
set_task(15.0"MatchIsOver"taskId)

Here It Was Kinda Like This

PHP Code:
public EndMatch() {
    
set_hudmessage(2552552550.070.5906.015.0)
    
ShowSyncHudMsg(0g_MsgSync3"%L"LANG_PLAYER"MATCH_OVER"g_iScore[0], g_iScore[1])
    
client_print(0print_chat"%s %L"PREFIXLANG_PLAYER"MATCH_OVER2")
    
client_print(0print_chat"%s %L"PREFIXLANG_PLAYER"MATCH_OVER3")
    
client_print(0print_chat"%s %L"PREFIXLANG_PLAYER"PLUGIN_RESTART")
    
g_Restart true
    
    sortPoints
()
    
    if ( 
get_pcvar_num(cvar_Rankings) )
        
doRankings()
        
    new 
taskId scanForTaskID()
    
set_task(15.0"MatchIsOver"taskId)

But Some How I Managed It And Now It Looks Like This [After Changes]:


PHP Code:
public EndMatch() {
    
set_hudmessage(2552552550.070.5906.015.0)
    
ShowSyncHudMsg(0g_MsgSync3"%L"LANG_PLAYER"MATCH_OVER"g_iScore[0], g_iScore[1])
    
client_print(0print_chat"%s %L"PREFIXLANG_PLAYER"MATCH_OVER2")
    
client_print(0print_chat"%s %L"PREFIXLANG_PLAYER"MATCH_OVER3")
    
client_print(0print_chat"%s %L"PREFIXLANG_PLAYER"PLUGIN_RESTART")
    
g_Restart true
    
    sortPoints
()
    
    if ( 
get_pcvar_num(cvar_Rankings) )
        
doRankings()
        
    
set_task(10.0"MatchIsOver")


public 
MatchIsOver() 

    
set_pcvar_string(cvar_sv_password""
    
server_cmd("exec practice.cfg"
    
server_cmd("restart"

P.S: Din't Made Any Change In ColorChat Hence, Didn't Include Colorchat.inc

+ Successfully Deleted:

Quote:
Originally Posted by iNdio View Post
[1] Delete:

PHP Code:
public MatchIsOver()
{
    
set_pcvar_string(cvar_sv_password"")
    
set_task(1.0"restartServer"scanForTaskID())
}

public 
restartServer()
{
    
server_cmd("restart")

Thanks Alot, For The Help, Will Soon Let You And Everyone Know, That How It Works? And Is It The Final Solution?

Last edited by Alber9091; 12-05-2016 at 07:53. Reason: Made, Some Changes In Coding [Little Change], After Deleting Last Reply.
Alber9091 is offline
Old 12-04-2016, 21:19
Alber9091
This message has been deleted by Alber9091. Reason: Compilation Fixed, May be, somehow there was my mistake.
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-05-2016 , 09:41   Re: Server Executes Command, say !stopmatch as soon as when it gets Empty
Reply With Quote #8

Well, After These Changes ..!!

Scores Don't Reset In Second Half ..!! [In ScorBaord, I forget to notice teams score, but clients score, didn't changed ..!! where as teams shuffle and TEAM A and TEAM B scores were fine and accordingly ..!!]

Another Thing, "Last Round Has Been Started", Message, Appeared In First Round Of 2nd Half, Instead Of Last Round Of First Half ..!!
Alber9091 is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 12-06-2016 , 16:51   Re: Server Executes Command, say !stopmatch as soon as when it gets Empty
Reply With Quote #9

I play around with automix plugin alot.
Please write exactly what you need help with and i will help you.
4ever16 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-06-2016 , 19:10   Re: Server Executes Command, say !stopmatch as soon as when it gets Empty
Reply With Quote #10

Quote:
Originally Posted by 4ever16 View Post
I play around with automix plugin alot.
Please write exactly what you need help with and i will help you.
4ever, I actually, wanted some kind of plugin, and had clearly explained it, but not no more ..!! As, Thanks Alot To iNdio, He had helped me alot ..!! Now, its totally different criteria, I hope, he will fix that too ..!!

Thanks for offering, but still, if there will be any possible help, I will surely contact you ..!!

Last edited by Alber9091; 12-06-2016 at 19:18.
Alber9091 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 20:26.


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