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

CSS Restart round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shubhishubhi
Senior Member
Join Date: Mar 2008
Old 07-17-2008 , 02:10   CSS Restart round
Reply With Quote #1

How can I restart a round in CSS. I can't use sv_restartround because it is CS1.6 command and I cannot use mp_restartgame because it prints center messages like "The game will restart in 1 seconds".

I also tried to Hook the restart_round event but i get the following message:
Quote:
[SM] Native "HookEvent" reported: Game event "restart_round" does not exist

Please suggest some other mechanism for this.

Last edited by shubhishubhi; 07-17-2008 at 03:49.
shubhishubhi is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-17-2008 , 13:25   Re: CSS Restart round
Reply With Quote #2

Code:
ServerCommand("mp_restartgame 1");
PrintCenterText(client, " ");
That might possibly restart the round and then block the center text by printing a space.
__________________
Greyscale is offline
shubhishubhi
Senior Member
Join Date: Mar 2008
Old 07-18-2008 , 01:16   Re: CSS Restart round
Reply With Quote #3

Its sad to say that this doesn't work!!!

Any other suggestions!
shubhishubhi is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-18-2008 , 19:57   Re: CSS Restart round
Reply With Quote #4

Sigscan CCSGameRules::TerminateRound function.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-18-2008 , 23:20   Re: CSS Restart round
Reply With Quote #5

Quote:
Originally Posted by teame06 View Post
Sigscan CCSGameRules::TerminateRound function.
It still prints a message though, no? He doesn't want the center text
__________________
Greyscale is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-19-2008 , 09:05   Re: CSS Restart round
Reply With Quote #6

TerminateRound function would end a round. like round draw, ct win, terrorist win, etc IIRC
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
shubhishubhi
Senior Member
Join Date: Mar 2008
Old 07-21-2008 , 01:03   Re: CSS Restart round
Reply With Quote #7

I am not able to find the function TerminateRound(). Is it a SourceMod API?

The problem I am facing is: In a 2v2 game (with my team balancing plugin which assigns teams to players on connect using ChangeClientTeam) one of the player occasionaly dies while connecting to the server. I had solved similar issue in CS 1.6 using sv_restartround, but since it is not available in CSS, I wanted to use mp_restartgame.

However, mp_restartgame displays messages like "Round Draw!", "The game will commence in X seconds". I tried to override these messages but could not do so.

I am still facing the player death issue on connect. Is there any other alternative to resolve this issue which I am missing.

Could this be because of the ChangeClientTeam API, because it says the followind in the API's description:
Quote:
Notes:
Changes a client's team through the mod's generic team changing function. On CS:S, this will kill the player.
But the problem that I am seeing is occasional, not every player dies.

Comments are welcome.

Last edited by shubhishubhi; 07-21-2008 at 02:11.
shubhishubhi is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-21-2008 , 09:19   Re: CSS Restart round
Reply With Quote #8

TerminateRound is not a SM API. It a function in the server.dll/_i486.so. Like I said you have to sigscan it. If you don't understand what that is then you won't be able to use that function.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
shubhishubhi
Senior Member
Join Date: Mar 2008
Old 07-23-2008 , 01:58   Re: CSS Restart round
Reply With Quote #9

Thanks teame06, but I am afraid, I won't be able to use this function.

It leaves me with the option of using restart round alone
Quote:
ServerCommand(mp_restartgame, 1);
Is it possible to create a hook for the message "The game will start in 1 seconds" so that I can eat up the message. Anything which works similar to the register_event API of AMXMODX.
shubhishubhi is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-23-2008 , 03:30   Re: CSS Restart round
Reply With Quote #10

I would think printing " " with PrintCenterText maybe a frame after calling mp_restartgame would do the trick.
__________________
Greyscale 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 07:12.


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