1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74. | #include <amxmodx>
#define OD_GODZINY 9
#define DO_GODZINY 22
#define FLAGA_VIP ADMIN_LEVEL_H
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new bool:g_bDarmowyVip;
new g_ForwardOne;
public plugin_init()
{
new szGodzina[4], iGodzina;
register_plugin(PLUGIN, VERSION, AUTHOR);
g_ForwardOne=CreateMultiForward("amxbans_admin_connect", ET_CONTINUE, FP_CELL);
get_time("%H", szGodzina, 3);
iGodzina = str_to_num(szGodzina);
if(OD_GODZINY <= iGodzina || iGodzina < DO_GODZINY)
g_bDarmowyVip = true;
}
public client_authorized(id)
{
set_task(1.0, "_client_connect", id);
}
public client_disconnect(id)
{
remove_task(id)
}
public _client_connect(id)
{
if(g_bDarmowyVip)
{
if(is_steam(id)
{
set_task(10.0, "Free_VIP", id);
}
}
}
public Free_VIP(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_G)
{
return;
}
if(is_user_steam(id))
{
set_user_flags(id, FLAGA_VIP);
new iForwardOne;
ExecuteForward(g_ForwardOne, iForwardOne, id);
}
}
stock bool:is_steam(id)
{
new auth[65]
get_user_authid(id,auth,64)
if(contain(auth, "STEAM_0:0:") != -1 || contain(auth, "STEAM_0:1:") != -1)
return true;
return false;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1250\\ deff0\\ deflang1045{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ |