PDA

View Full Version : PROBLEM GAME COMENCING


Bello
06-12-2010, 19:54
Hi friends am new to the forum and would like to know how do i block the restart of the game comencing, I have this code:

public plugin_init()
{
register_message(get_user_msgid("TextMsg"), "message_TextMsg")
}

public message_TextMsg(msg_id, msg_dest, msg_entity)
{
static buffer[32]

get_msg_arg_string(2, buffer, 31)

if(equal(buffer, "#Game_Commencing") || equal(buffer, "#Game_will_restart_in"))
return PLUGIN_HANDLED

return PLUGIN_CONTINUE
}Sorry for my bad english!

Bello2
06-21-2010, 16:52
some help?

ot_207
06-21-2010, 16:56
http://wiki.alliedmods.net/Half-Life_1_Game_Events#HudTextArgs

Bello2
06-21-2010, 17:07
I do not understand that link...

My code works very well, what i want to know is as blocking the restart that runs the game comencing

fysiks
06-21-2010, 18:22
I'm confused on your motive. Are you trying to prevent the game from even starting? Or are you just trying to stop messages/sound from displaying/being heard?

Note: I don't play CS so I'm not really sure what "game commencing" does.

Kreation
06-21-2010, 18:29
For Example: If there is one player in the server and another joins on the opposite team, the Game Commencing message will come up and about a second later they restart and it's the beginning of the round.

Bello2
06-21-2010, 18:40
For Example: If there is one player in the server and another joins on the opposite team, the Game Commencing message will come up and about a second later they restart and it's the beginning of the round.

Exact that is what i want blocked, I achieved blocked msg that appears in the middle of the screen but not the restart that runs the game comencing :(

Alucard^
06-21-2010, 18:56
Use Infinity Rounds by Arkshine.

Bello2
06-21-2010, 19:11
Use Infinity Rounds by Arkshine.

alucard Exactly i'm using that plugin, and it is that i is causing the error you explain to see if your me aid:

When I open my server, the plugin infinite round of arkshine this activated, After during the game I run infiniteround_toggle 0, To run this command that served to pause plugin, It is when you run the game comencing and is what i'm trying to eliminate...

P.S: When I run the command provided there are 10 players on the server

fysiks
06-21-2010, 19:57
OMG, learn to speak english or stop posting in an english forum.

Arkshine
06-21-2010, 19:59
I really don't understand what he wants exactly. Infinite Round blocks the game commencing ( it should not though ^^ ), so I don't get what is the problem. ^^

Bello2
06-21-2010, 20:20
To make it more simple:

When I run: infiniteround_toggle 0, To disable the infinite round, Runs a game comencing

That is what i eliminate/blocked.

Arkshine
06-21-2010, 20:24
To block the game commencing, you have to enable the plugin, not disabled. Oo

Bello2
06-21-2010, 20:29
You have reason but in my server, there are instances in which do not need the infinite round.

Then when disabled plugin, runs the game comencing, and when the active there is no problem, what i want is to help me to eliminate the game comencing.

Alucard^
06-21-2010, 21:57
Arkshine, he means that in some cases he need to enable the plugin and in some cases disable (in the same map) but with your plugin when you enable or disable, the plugin need to restart the game. He don't want the restart part.

Bello2
06-22-2010, 17:49
Exact, when disable plugin in the same map is that runs the game comencing.

The plugin of arkshine blocked the game comencing, but the disable the plugin returns everything back to normal and runs the game comencing here is not the problem with the plugin is with the game comencing. Who helps me to finish blocking game comencing?

wrecked_
06-22-2010, 18:07
#include <amxmodx>

public plugin_init()
{
register_plugin( "Game Commencing Block", "1.0", "Wrecked" )

if( !is_plugin_loaded( "Infinite Round" ) )
{
set_fail_state( "Infinite Round by Arkshine must be loaded." )
}

register_message(get_user_msgid("TextMsg"), "message_TextMsg")
}

public message_TextMsg(msg_id, msg_dest, msg_entity)
{
static buffer[32]

get_msg_arg_string(2, buffer, 31)

if(equal(buffer, "#Game_Commencing"))
{
server_cmd( "infiniteround_toggle 1" )

set_task( 1.0, "TaskPausePlugin" )

return PLUGIN_HANDLED
}

return PLUGIN_CONTINUE
}

public TaskPausePlugin()
{
server_cmd( "infiniteround_toggle 0" )
}

Alucard^
06-22-2010, 18:34
@ wrecked_

That does not prevent the sv_restart thing.

wrecked_
06-22-2010, 18:58
@ wrecked_

That does not prevent the sv_restart thing.
Fixed.

Bello2
06-22-2010, 19:01
I prove later :D

Bello2
06-22-2010, 20:08
Fixed.

Not fixed

It continues to implement the restart of the game comencing :(

wrecked_
06-22-2010, 20:09
Do you have Arkshine's plugin on your server and running?

Bello2
06-22-2010, 20:12
Course, when disable plugin is when it happens the game comencing, we have already eliminated the msg, but is still running the restart

Alucard^
06-22-2010, 23:05
@ wrecked_

How you want to prevent the restart thing with that code? o.O

GXLZPGX
06-23-2010, 02:31
The first thing I noticed when I opened the thread is that the brackets are indented lol.

fysiks
06-23-2010, 04:08
The first thing I noticed when I opened the thread is that the brackets are indented lol.

Yeah, and it's annoying. :|

wrecked_
06-23-2010, 07:02
@ wrecked_

How you want to prevent the restart thing with that code? o.O
I have it as catching the Game_Commence message, enabling the plugin for a brief time to stop the restart, and then setting a task to turn it off so it restarts like normal in the future.

Unfortunately it looks like Arkshine's plugin needs to catch everything on its own and I'm turning it on too late into the restart process.

Bello2
06-23-2010, 12:36
Wrecked there is no way to eliminate the restart that runs the game comencing?

Since i tested your code, but is still running the restart.

Alucard^
06-23-2010, 12:48
@ wrecked_

You have to know that infiniteround_toggle in 0 make a restart, infiniteround_toggle in 1 make a restart too... so with your code, in the last part you are doing a infiniteround_toggle 0, then the plugin make a restart ><

Bello2
06-24-2010, 00:42
@ wrecked_

You have to know that infiniteround_toggle in 0 make a restart, infiniteround_toggle in 1 make a restart too... so with your code, in the last part you are doing a infiniteround_toggle 0, then the plugin make a restart ><

Alucard has all the reason, your code what he did was to eliminate the msg but not the restart that runs the game comencing.

Someone who can eliminate the restart PLEASE...