[AMXX] Round Restart
Lehekülg 1, lehekülgi kokku 1 • Share
- Tonight
- Liitus : 19/02/2012
Postitusi : 18000
Made by: Mucx
Idee on lihtne, teeb peale esimest roundi restartround.
Idee on lihtne, teeb peale esimest roundi restartround.
- Kood:
#include < amxmodx >
new g_Round;
new g_Restart;
public plugin_init( ) {
register_plugin( "Restart Round" , "0.1" , "Mucx" );
register_event( "TextMsg" , "Game_Commencing" , "a" , "2Game_C" );
register_event( "HLTV" , "New_Round" , "a" , "1=0" , "2=0" );
register_logevent( "Round_End" , 2 , "1=Round_End" );
}
public Game_Commencing( ) {
g_Round = 0;
g_Restart = true;
}
public New_Round( )
g_Round++;
public Round_End( ) {
if( g_Round == 1 && g_Restart ) {
set_cvar_num( "sv_restartround", 1 );
g_Restart = false;
}
}
- Kood:
#include < amxmodx >
new Round;
new Restart;
new RoundTime;
public plugin_init() {
register_plugin( "Restart Round" , "1.0" , "Mucx" );
register_event( "TextMsg" , "GameCommencing" , "a" , "2Game_C" );
register_event( "HLTV" , "NewRound" , "a" , "1=0" , "2=0" );
register_logevent( "RoundEnd" , 2 , "1=Round_End" );
RoundTime = get_cvar_pointer( "mp_roundtime" );
}
public GameCommencing( ) {
Restart = true;
Round = 0;
}
public NewRound( ) {
Round++;
if( Restart && Round == 1 ) {
new Float:MsgTime = get_pcvar_float( RoundTime ) * 60;
set_hudmessage( 255 , 255 , 255 , 0.01 , 0.90 , 0 , 6.0 , MsgTime );
show_hudmessage( 0 , "Warmup Round" );
}
}
public RoundEnd( ) {
if( Restart && Round == 1 ) {
set_cvar_num( "sv_restartround", 1 );
Restart = false;
}
}
Soovid vestluses osaleda?
Selleks logi sisse või tee endale kasutaja.
Lehekülg 1, lehekülgi kokku 1
Permissions in this forum:
Sa ei saa vastata siinsetele teemadele