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

Instant sv_restartround


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lazarev
Veteran Member
Join Date: Sep 2008
Old 09-20-2010 , 11:51   Instant sv_restartround
Reply With Quote #1

Hi, I want a plugin that does sv_restartround instantly



P.S. already tried resetting entities with Ham_CS_Restart, but startbuttons on kz maps dont want to reset
lazarev is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-20-2010 , 14:00   Re: Instant sv_restartround
Reply With Quote #2

Because you need to reset the timer, not the button ;)
Anyway, i think Restart is executed each new round, so i don't think timers are reseted each round on kz maps.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 10-05-2010 , 06:23   Re: Instant sv_restartround
Reply With Quote #3

teh bump
lazarev is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 10-21-2011 , 17:06   Re: Instant sv_restartround
Reply With Quote #4

I'll just leave this here..
PHP Code:
#include < amxmodx >
#include < orpheu_stocks >
#include < orpheu_memory >

#define set_mp_pdata(%1,%2)  ( OrpheuMemorySetAtAddress( g_pGameRules, %1, 1, %2 ) )

new g_pGameRules;

public 
plugin_init() 
{
    
register_plugin"Instant Round Restart""0.0.1""Juice" );
    
register_concmd"amx_restartround""cmdRestart", -1"Restart the round instantly" );
}

public 
plugin_precache()
{
    
OrpheuRegisterHookOrpheuGetFunction("InstallGameRules"),"OnInstallGameRules"OrpheuHookPost );
}

public 
OnInstallGameRules()
{
    
g_pGameRules OrpheuGetReturn();
}

public 
cmdRestartid )
{
    
client_printidprint_center"The game will restart in 0.1 SECOND" );
    
RestartRound( .delay 0.1 ); // RoundTerminating from arkshine's Round Terminator
}

RestartRound( const Float:delay )
{
    
set_mp_pdata"m_fTeamCount"get_gametime() + delay );
    
set_mp_pdata"m_bRoundTerminating"true );


Last edited by lazarev; 10-21-2011 at 17:20.
lazarev is offline
jackas
Senior Member
Join Date: Feb 2011
Old 10-21-2011 , 17:21   Re: Instant sv_restartround
Reply With Quote #5

LoL old thread bumped !
jackas is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 10-21-2011 , 17:38   Re: Instant sv_restartround
Reply With Quote #6

Quote:
Originally Posted by jackas View Post
LoL old thread bumped !
This is my thread.
lazarev is offline
jackas
Senior Member
Join Date: Feb 2011
Old 10-21-2011 , 17:40   Re: Instant sv_restartround
Reply With Quote #7

Congo
jackas is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 07-11-2014 , 13:20   Re: Instant sv_restartround
Reply With Quote #8

Old thread bump, that would not create a new same.

Code above works good, except some things:
This Round Restart not "original". It's not strip Players weapons and not set Players scores (and Teams scores) to 0 (zero).
That's sad .

Can I call exactly "sv_restart 1" Round Restart, but without 1 Second delay (instantly)?
Phant is offline
Send a message via ICQ to Phant
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 07-11-2014 , 13:34   Re: Instant sv_restartround
Reply With Quote #9

xD , tested & worked
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("amx_restartround","round_restart")
}
public 
round_restart(id)
{
    if(
is_user_admin(id))
    {
        
server_cmd("sv_restart 1")
    }

__________________
Eagle07 is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 07-11-2014 , 13:46   Re: Instant sv_restartround
Reply With Quote #10

Quote:
Originally Posted by Eagle07 View Post
xD , tested & worked
Phant is offline
Send a message via ICQ to Phant
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 01:59.


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