Code: Select all
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "AutoRestart"
#define VERSION "1.0"
#define AUTHOR "K!D()X"
new Restart = 0;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_logevent("AutoRestart", 2, "1=Round_End");
}
public AutoRestart(id) {
Restart++;
if(Restart == 2) {
new szMapName[32], szNextMap[32];
get_mapname(szMapName, 31);
get_cvar_string("amx_nextmap", szNextMap, 31);
server_cmd("sv_restart 1");
K1d0x_C_Color(0, "#t[Auto Restart] #cHarta actuala : #t%s", szMapName);
K1d0x_C_Color(0, "#t[Auto Restart] #cUrmatoarea harta : #t%s", szNextMap);
K1d0x_C_Color(0, "#t[Auto Restart] #cJucatori : #t%d", get_playersnum(1));
K1d0x_C_Color(0, "#t[Auto Restart] #ceva asteptam pe #thttp://extreamcs.com/");
}
}
stock K1d0x_C_Color(const id, const input[], any:...) {
new szNumber = 1, szPlayers[32];
static szMsg[191];
vformat(szMsg, 190, input, 3);
replace_all(szMsg, 190, "#g", "^4"); /* Green color */
replace_all(szMsg, 190, "#c", "^1"); /* Color of chat */
replace_all(szMsg, 190, "#t", "^3"); /* Color of team CT = Blue | TERRORIST = Red */
replace_all(szMsg, 190, "#dt", "^0"); /* Default color of team */
if(id)
szPlayers[0] = id;
else
get_players(szPlayers, szNumber, "ch"); {
for(new i = 0; i < szNumber; i++) {
if(is_user_connected(szPlayers[i])) {
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, szPlayers[i]);
write_byte(szPlayers[i]);
write_string(szMsg);
message_end();
}
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{ rtf1 ansi ansicpg1250 deff0 deflang1048{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard f0 fs16 n par }
*/