Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT \
- ` Alkis ` \
- By Yiin
- #include <a_samp>
- new t;
- public OnFilterScriptInit()
- {
- print(" -:: ` Alkis ` ");
- t = SetTimer("lol", 77777, true);
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(t);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SetHundryLevel(playerid, 200);
- return 1;
- }
- forward lol();
- public lol()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- if(IsPlayerConnected(i))
- {
- new xd = GetHungryLevel(i) - 1;
- SetPVarInt(i, "alkis", xd);
- if(xd && xd < 20)
- SetPlayerDrunkLevel(i, 300);
- else if(!xd)
- SetPlayerHealth(i, 0.0);
- else
- SetPlayerDrunkLevel(i, 0);
- }
- return 1;
- }
- stock SetHundryLevel(playerid, lvl)
- {
- SetPVarInt(playerid, "alkis", lvl);
- }
- stock GetHungryLevel(playerid)
- {
- return GetPVarInt(playerid, "alkis");
- }
Advertisement
Add Comment
Please, Sign In to add comment