Page 1 of 1

Cerere plugin Event vip free

Posted: 12 Jul 2019, 02:19
by LoadiNNNg
Bună ziua tuturor!
Vreau să solicit plug-in-ul gratuit pentru Evenimentul VIP de la 11:00 la 08:00, am găsit de fapt niște add-on-uri, dar niciunul nu lucrează pentru mine.
Este pentru "bit".
Vă mulțumim anticipat.

Re: Cerere plugin Event vip free

Posted: 12 Jul 2019, 19:56
by levin
poate nu lucrează că tu setezi ora prost, ora 11:00?? poate 23:00

Code: Select all

#include <amxmodx>

new const TAG[] = "[TAG]";

new bool:vip_free, g_msg_saytext;

public plugin_init()
{
	register_plugin("Free VIP Giver", "2.0", "cyby")
	check_time()
	set_task(60.0, "check_time", _, _, _, "b")
	set_task(1.0, "hud_mess", _, _, _, "b")
	
	g_msg_saytext = get_user_msgid("SayText");
}

public check_time()
{
	static preluare_ora[3], ora;
	get_time("%H", preluare_ora, 2)
	ora = str_to_num(preluare_ora)
	if(11 <= ora || ora < 8)
	{
		if(!vip_free)
			color(0, ".v%s.g Eventul.e Free VIP.g a fost activat!", TAG)
		vip_free = true
		server_cmd("amx_default_access ^"bit^"")
	}
	else
	{
		if(vip_free)
			color(0, ".v%s.g Eventul.e Free VIP.g a fost dezactivat!", TAG)
		vip_free = false
		server_cmd("amx_default_access ^"z^"")
	}
	server_cmd("amx_reloadadmins")
}

public hud_mess()
{
	if(vip_free)
	{
		set_hudmessage(random(0), random(255), random(0), 0.00, 0.17, 1, 1.0, 1.0, 0.1, 0.1)
		show_hudmessage(0, "Event Free VIP !")
	}
}

stock color(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)

	replace_all(msg, 190, ".v", "^4")
	replace_all(msg, 190, ".g", "^1")
	replace_all(msg, 190, ".e", "^3")

	if(id) players[0] = id; else get_players(players, count, "ch")
	{
		for(new i = 0; i < count; i++)
		{
			if(is_user_connected(players[i]))
			{
				message_begin(MSG_ONE_UNRELIABLE, g_msg_saytext, _, players[i])
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
		}
	}
}

Re: Cerere plugin Event vip free

Posted: 18 Jul 2019, 07:33
by faKe91
Mutat in sectiunea corespunzatoare