[Plugin] Auto Restart Round

#1
Numele Plugin-ului: Auto Restart Round
Descriere: Este un plugin de auto restart pentru serverele clasice.
Download:

Cod: Selectaţi tot

#include < amxmodx >
#include < amxmisc >

new const PLUGIN [ ] =	"Auto Round Restart";
new const VERSION [ ] =	"1.0";
new const AUTHOR [ ] =	"LondoN eXtream";

new Players [ 32 ], Num, g_Count, iSec;
new MessageScreenFade;

public plugin_init ( )
{
	register_plugin ( PLUGIN, VERSION, AUTHOR );

	MessageScreenFade = 	get_user_msgid ( "ScreenFade" );

	register_event ( "TextMsg", "Event_Game", "a", "2&#Game_C" );
	register_event ( "HLTV", "Event_NewRound", "a", "1=0", "2=0" );
}

public Event_Game ( )	g_Count = 0;
public Event_NewRound ( )
{
	if ( g_Count++ == 1 )
	{
		server_cmd ( "sv_restart 1" );

		get_players ( Players, Num );

		for ( new i = 0; i < Num; i++ )
		{
			iSec = clamp ( ( 2 * (1<<12) ), 0, 0xFFFF );

			message_begin ( MSG_ONE_UNRELIABLE, MessageScreenFade, _, Players [ i ] );
			write_short ( iSec );
			write_short ( iSec );
			write_short ( 0x0001 );
			write_byte ( 0 );
			write_byte ( 127 );
			write_byte ( 255 );
			write_byte ( 255 );
			message_end ( );
		}

		new StringMap [ 32 ];
		new Players = get_playersnum ( );
		new MaxP = get_maxplayers ( );

		get_mapname ( StringMap, charsmax ( StringMap ) );

		Print ( 0, "^x04Live^x03 #^x04 Live^x03 #^x04 Live^x03 #^x04 Live^x03 #" );
		Print ( 0, "^x04[Auto Round Restart]^x01 We are^x03 %d^x01 /^x03 %d players connected.", Players, MaxP );
		Print ( 0, "^x04[Auto Round Restart]^x01 We are playing on map^x03 %s", StringMap );
		Print ( 0, "^x04Live^x03 #^x04 Live^x03 #^x04 Live^x03 #^x04 Live^x03 #" );
	}
}

stock Print(const id, const input[], any:...) {
    new count = 1, players[32];
    static msg[191];
    vformat(msg, 190, input, 3);
   
    if(id) players[0] = id;
    else get_players(players, count, "ch"); {
        for(new i = 0; i < count; i++) {
            if(is_user_connected(players)) {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
                write_byte(players);
                write_string(msg);
                message_end();
            }
        }
    }
}
Autor: Anonim
Sursa (Link-ul oficial): extreamcs
AmxModX/AdminMod: amxmodx
CVar-uri: -
Module necesare: -
Comenzi: -
Instalare:
  • AutoRestartRound.sma il puneti in fisierul scripting
  • AutoRestartRound.amxx il puneti in fisierul plugins.
  • Intrati in plugins.ini si adaugati:
Imagini: -
.Sma: -
Imagine
Imagine
Smiley Oneplay.Ro
DarkAngel2 e the best

Înapoi la “[Resurse] Pluginuri”

Cine este conectat

Utilizatori răsfoind acest forum: Niciun utilizator înregistrat și 0 vizitatori