[Cerere Plugin] Program de noapte

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
User avatar
paraParaschiv
Membru, skill +1
Membru, skill +1
Posts: 137
Joined: 12 Jun 2019, 18:06
Detinator Steam: Da
CS Status: PuNcT
Detinator server CS: « ESL.CSPOWER.RO »
SteamID: Stai LIN !
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 2 times

14 Jun 2020, 15:12

ForWWarD wrote:
14 Jun 2020, 14:35
iNdio wrote:
12 Jun 2020, 03:51

Code: Select all

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!n", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "c");
	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();
			}
	} 
}
--- >

Code: Select all

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!n", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "c");
	for(new i = 0; i < count; i++) {
			if (is_user_connected(players[i])) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
	} 
}

Code: Select all

#include 		<amxmodx>

#define 		PLUGIN		"NIGHT MODE"
#define 		VERSION		"1.0"
#define 		AUTHOR		"DaNNe."
	
new bool: NIGHTMODE

public 		plugin_init() {
		register_plugin(PLUGIN, VERSION, AUTHOR)
		set_task(0.8,		"TIME",	_, _, _, "b")
		
		register_clcmd("amx_map",			"CMD_BLOCK")
		register_clcmd("amx_mapmenu", 		"CMD_BLOCK")
		register_clcmd("amx_votemap",		"CMD_BLOCK")
		register_clcmd("amx_votemapmenu",	"CMD_BLOCK")
}

public 		TIME() {
			new Time[64],		TimeLen		=	charsmax(Time)
			get_time("%H:%M:%S", Time, TimeLen)
			if(equal(Time, "22:59:59")) {
				ColorChat(0, "Server-ul trece la programul de noapte. Se schimba mapa pe!t de_dust2!n si!t mp_timelimit 0")
				set_cvar_num("mp_timelimit", 0)
				server_cmd("amx_map de_dust2")
				NIGHTMODE	=	true;
			}
			else if(equal(Time, "09:00:00")) {
				ColorChat(0, "Server-ul trece la programul de zi. Se seteaza CVAR:!t mp_timelimit 30")
				set_cvar_num("mp_timelimit", 30)
				NIGHTMODE	=	false;
			}
}

public 		CMD_BLOCK(id) {
		if(NIGHTMODE) {
			client_print(id, print_console, "NIGHTMODE este activ, nu ai acces la comenzile de schimbare map.")
			return PLUGIN_HANDLED
		}
		return PLUGIN_CONTINUE
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!n", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "c");
	for(new i = 0; i < count; i++) {
			if (is_user_connected(players[i])) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
	} 
}
->

Code: Select all

public 		TIME() {
			new Time[64],		TimeLen		=	charsmax(Time)
			get_time("%H:%M:%S", Time, TimeLen)
			if(equal(Time, "22:59:59")) {
				ColorChat(0, "Server-ul trece la programul de noapte. Se schimba mapa pe!t de_dust2!n si!t mp_timelimit 0")
				set_cvar_num("mp_timelimit", 0)
				server_cmd("amx_map de_dust2")
				NIGHTMODE	=	true;
			}
			else if(equal(Time, "09:00:00")) {
				ColorChat(0, "Server-ul trece la programul de zi. Se seteaza CVAR:!t mp_timelimit 30")
				set_cvar_num("mp_timelimit", 30)
				NIGHTMODE	=	false;
			}
}

Acolo ai timp-ul si comenzile pe care le executa , si aici ai ce iti blocheaza
->

Code: Select all

register_clcmd("amx_map",			"CMD_BLOCK")
		register_clcmd("amx_mapmenu", 		"CMD_BLOCK")
		register_clcmd("amx_votemap",		"CMD_BLOCK")
		register_clcmd("amx_votemapmenu",	"CMD_BLOCK")
Eu iti recomand: https://forums.alliedmods.net/showthread.php?t=161095
cu urmatoarele setari:

Code: Select all

# Lines starting without " will be taken as comments!

# The format is :  "TIME" "COMMAND"




"23:59" "amx_say [NORD-Security] Intr-un minut va incepe programul de noapte, mapa urmatoare: de_dust2"
"23:59" "amx_say In timpul programului de noapte nimeni nu va avea acces la schimbarea hartilor"
"00:00" "amx_map de_dust2"
"00:01" "amx_cvar mp_timelimit 0"
"00:01" "amx_say [NORD-Security] Program de noapte 'Activ'"

"00:03" "amx_pausecfg stop adminvote" 

"00:03" "amx_pausecfg stop mapchooser" 

"00:03" "amx_pausecfg stop mapsmenu" 

  
"10:59" "amx_say [NORD-Security] Intr-un minut se va dezactiva program-ul de noapte"

"11:00" "amx_say Pana la ora 13:00 se vor juca doar hartile clasice!"

"11:10" "amx_map de_inferno"














// DARK HOURS

// WHEN IS IT NIGHT? WHICH HOURS?

// CONFIGURE IT THE WAY YOU WANT!

// AVAILABLE HOURS :  00, 01, 02, 03, ..., 09, 10, 11, 12, ..., 13, 14, 15, ..., 19, 20, 21, 22, 23  [00 <-> 23]

//

"DARK HOURS" "23, 00, 01, 02, 03, 04, 05, 06, 07, 08, 09"

daca esti amabil as dori si eu plugin-ul NORD-Secury in sma. multumesc !
ESL.CSPOWER.RO
RoyalServer 2
User avatar
ForWWarD
Membru, skill +1
Membru, skill +1
Posts: 427
Joined: 25 Feb 2017, 12:29
Detinator Steam: Da
CS Status: Glumind putem spune orice chiar adevărul
Detinator server CS: NORD.GLOBALELITE.RO
SteamID: /cafeanord
Reputatie: Fost Membru Club eXtreamCS (doua luni)
Fond eXtream: 0
Has thanked: 1 time
Been thanked: 2 times
Contact:

14 Jun 2020, 15:15

paraParaschiv wrote:
14 Jun 2020, 15:12
ForWWarD wrote:
14 Jun 2020, 14:35
iNdio wrote:
12 Jun 2020, 03:51

Code: Select all

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!n", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "c");
	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();
			}
	} 
}
--- >

Code: Select all

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!n", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "c");
	for(new i = 0; i < count; i++) {
			if (is_user_connected(players[i])) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
	} 
}

Code: Select all

#include 		<amxmodx>

#define 		PLUGIN		"NIGHT MODE"
#define 		VERSION		"1.0"
#define 		AUTHOR		"DaNNe."
	
new bool: NIGHTMODE

public 		plugin_init() {
		register_plugin(PLUGIN, VERSION, AUTHOR)
		set_task(0.8,		"TIME",	_, _, _, "b")
		
		register_clcmd("amx_map",			"CMD_BLOCK")
		register_clcmd("amx_mapmenu", 		"CMD_BLOCK")
		register_clcmd("amx_votemap",		"CMD_BLOCK")
		register_clcmd("amx_votemapmenu",	"CMD_BLOCK")
}

public 		TIME() {
			new Time[64],		TimeLen		=	charsmax(Time)
			get_time("%H:%M:%S", Time, TimeLen)
			if(equal(Time, "22:59:59")) {
				ColorChat(0, "Server-ul trece la programul de noapte. Se schimba mapa pe!t de_dust2!n si!t mp_timelimit 0")
				set_cvar_num("mp_timelimit", 0)
				server_cmd("amx_map de_dust2")
				NIGHTMODE	=	true;
			}
			else if(equal(Time, "09:00:00")) {
				ColorChat(0, "Server-ul trece la programul de zi. Se seteaza CVAR:!t mp_timelimit 30")
				set_cvar_num("mp_timelimit", 30)
				NIGHTMODE	=	false;
			}
}

public 		CMD_BLOCK(id) {
		if(NIGHTMODE) {
			client_print(id, print_console, "NIGHTMODE este activ, nu ai acces la comenzile de schimbare map.")
			return PLUGIN_HANDLED
		}
		return PLUGIN_CONTINUE
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!n", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "c");
	for(new i = 0; i < count; i++) {
			if (is_user_connected(players[i])) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
	} 
}
->

Code: Select all

public 		TIME() {
			new Time[64],		TimeLen		=	charsmax(Time)
			get_time("%H:%M:%S", Time, TimeLen)
			if(equal(Time, "22:59:59")) {
				ColorChat(0, "Server-ul trece la programul de noapte. Se schimba mapa pe!t de_dust2!n si!t mp_timelimit 0")
				set_cvar_num("mp_timelimit", 0)
				server_cmd("amx_map de_dust2")
				NIGHTMODE	=	true;
			}
			else if(equal(Time, "09:00:00")) {
				ColorChat(0, "Server-ul trece la programul de zi. Se seteaza CVAR:!t mp_timelimit 30")
				set_cvar_num("mp_timelimit", 30)
				NIGHTMODE	=	false;
			}
}

Acolo ai timp-ul si comenzile pe care le executa , si aici ai ce iti blocheaza
->

Code: Select all

register_clcmd("amx_map",			"CMD_BLOCK")
		register_clcmd("amx_mapmenu", 		"CMD_BLOCK")
		register_clcmd("amx_votemap",		"CMD_BLOCK")
		register_clcmd("amx_votemapmenu",	"CMD_BLOCK")
Eu iti recomand: https://forums.alliedmods.net/showthread.php?t=161095
cu urmatoarele setari:

Code: Select all

# Lines starting without " will be taken as comments!

# The format is :  "TIME" "COMMAND"




"23:59" "amx_say [NORD-Security] Intr-un minut va incepe programul de noapte, mapa urmatoare: de_dust2"
"23:59" "amx_say In timpul programului de noapte nimeni nu va avea acces la schimbarea hartilor"
"00:00" "amx_map de_dust2"
"00:01" "amx_cvar mp_timelimit 0"
"00:01" "amx_say [NORD-Security] Program de noapte 'Activ'"

"00:03" "amx_pausecfg stop adminvote" 

"00:03" "amx_pausecfg stop mapchooser" 

"00:03" "amx_pausecfg stop mapsmenu" 

  
"10:59" "amx_say [NORD-Security] Intr-un minut se va dezactiva program-ul de noapte"

"11:00" "amx_say Pana la ora 13:00 se vor juca doar hartile clasice!"

"11:10" "amx_map de_inferno"














// DARK HOURS

// WHEN IS IT NIGHT? WHICH HOURS?

// CONFIGURE IT THE WAY YOU WANT!

// AVAILABLE HOURS :  00, 01, 02, 03, ..., 09, 10, 11, 12, ..., 13, 14, 15, ..., 19, 20, 21, 22, 23  [00 <-> 23]

//

"DARK HOURS" "23, 00, 01, 02, 03, 04, 05, 06, 07, 08, 09"

daca esti amabil as dori si eu plugin-ul NORD-Secury in sma. multumesc !
Plugin-ul l-am lasat mai sus, nu trebuie vreun alt fel de plugin decat cel official 'Server Task 2.0' Si reclamele si ce mai vrei tu le editezi de aici din server_tasks.ini
->' https://www95.zippyshare.com/v/QTolSiaK/file.html '
,,Numai după invidia altora îți dai seama de propria ta valoare."
--> Tranzactii incheiate cu succes!
--> Teparii descoperiti de mine
Web-site: http://www.globalelite.ro/forum

Server detinut
: NORD.GLOBALELITE.RO - [IP: 188.212.100.239:27015]
User avatar
paraParaschiv
Membru, skill +1
Membru, skill +1
Posts: 137
Joined: 12 Jun 2019, 18:06
Detinator Steam: Da
CS Status: PuNcT
Detinator server CS: « ESL.CSPOWER.RO »
SteamID: Stai LIN !
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 2 times

14 Jun 2020, 16:21

multumesc rezolvat t/c
ESL.CSPOWER.RO
User avatar
deyu*
Membru, skill +1
Membru, skill +1
Posts: 325
Joined: 27 Oct 2013, 16:46
Detinator Steam: Da
CS Status: Play Hard Cs
Detinator server CS: Nu
SteamID: Popeofcanada
Location: Romania / Timis / Timisoara
Has thanked: 4 times
Been thanked: 1 time
Contact:

14 Jun 2020, 23:10

pluginul e ok dar nu se schimba timpul pe 0 si merge sa folosest si amx_map amx_votemap ...
Image
User: Deyu*
Y/M : deyu_design
DEbiL
Membru nou
Membru nou
Posts: 1
Joined: 09 Mar 2020, 21:24
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: CS.DARKCS.RO
Fond eXtream: 0

10 Aug 2020, 16:02

merci
Site Detinut ->: http://www.darkcs/forum

TS3 -> TS.DARKCS.RO

Server detinut: CS.DARKCS.RO - [IP: 5.254.20.14:27015]

:fist_pointing_right: :goblin: :dark_sunglasses:
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Semrush [Bot] and 34 guests