View difference between Paste ID: 62JwBy9T and b8Bg9enC
SHOW: | | - or go back to the newest paste.
1
#define FILTERSCRIPT															\
2
		` Alkis `                                                               \
3
		By Yiin
4
		
5
#include <a_samp>
6
7
new t;
8
9
public OnFilterScriptInit()
10
{
11
	print(" -:: ` Alkis ` ");
12-
	t = SetTimer("lol", 777, true);
12+
	t = SetTimer("lol", 77777, true);
13
	return 1;
14
}
15
16
public OnFilterScriptExit()
17
{
18
	KillTimer(t);
19
	return 1;
20
}
21
22
public OnPlayerConnect(playerid)
23
{
24
    SetHundryLevel(playerid, 200);
25
	return 1;
26
}
27
28
forward lol();
29
public lol()
30
{
31
	for(new i = 0; i < MAX_PLAYERS; i++)
32
	    if(IsPlayerConnected(i))
33
	    {
34
			new xd = GetHungryLevel(i) - 1;
35
			SetPVarInt(i, "alkis", xd);
36
			if(xd && xd < 20)
37
			    SetPlayerDrunkLevel(i, 300);
38
			else if(!xd)
39
			    SetPlayerHealth(i, 0.0);
40
			else
41
			    SetPlayerDrunkLevel(i, 0);
42
		}
43
	return 1;
44
}
45
46
stock SetHundryLevel(playerid, lvl)
47
{
48
	SetPVarInt(playerid, "alkis", lvl);
49
}
50
51
stock GetHungryLevel(playerid)
52
{
53
	return GetPVarInt(playerid, "alkis");
54
}