Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ____________________________________________________________________
- |||||||||||||||||||||| * ||||||| || || |||||||||||||||||||||||| ||
- || || || || || * || |||||| || || || ||
- ||||||| || ||||||||| * ||||||| || ||||||| || |||||| ||
- || || || || * || || || || || ||
- |||||||||||||||||||||| * |||||||||||||||||||||| || |||||| ||
- ____________________________________________________________________*/
- #define FILTERSCRIPT
- #include <a_samp>
- #include <progress>
- #include <zcmd>
- #include <YSI\y_ini>
- //__________DEFINE
- #define PATH "/PISS/%s.ini"
- // PRESSED(keys)
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- //ENUM
- enum pPiss
- {
- pPissLevel
- }
- //+++++++++++++NEW
- new PInfo[MAX_PLAYERS][pPiss];
- new Bar:PissBar[MAX_PLAYERS];
- new Pissing[MAX_PLAYERS];
- new Text[MAX_PLAYERS];
- new Text:PissNow;
- //+++++++++FORWARD
- forward PissTimer(playerid);
- forward PissFinish(playerid);
- forward PissUpdate(playerid);
- forward Drink(playerid);
- public OnFilterScriptInit()
- {
- SetTimer("PissTimer",300000, true);
- /*------------------------------------------------------------------------*/
- PissNow = TextDrawCreate(583.000000, 424.000000, "PissNow");
- TextDrawBackgroundColor(PissNow, 255);
- TextDrawFont(PissNow, 2);
- TextDrawLetterSize(PissNow, 0.300000, 1.100000);
- TextDrawColor(PissNow, 16777215);
- TextDrawSetOutline(PissNow, 1);
- TextDrawSetProportional(PissNow, 1);
- //===================
- new WC = CreateObject(19370, 1358.3272, -1665.1929, 14.0957, 0.0000, 0.0000, -0.2113);
- SetObjectMaterialText(WC, "WC", 0, 50, "Arial", 24, 0, -1, -16777216, 1);
- new GB = CreateObject(19353, 1355.6741, -1665.1467, 14.1092, 0.0000, 0.0000, -89.9654);
- SetObjectMaterialText(GB, "Girl<>Boy", 0, 50, "Arial", 24, 0, -32256, -16777216, 1);
- new dolar = CreateObject(19353, 1352.9499, -1666.6531, 13.9394, 0.0000, 0.0000, -0.9748);
- SetObjectMaterialText(dolar, "5$ For 1Slot", 0, 50, "Arial", 24, 0, -16468988, -16777216, 1);
- //====================
- CreateObject(19450, 1353.00854, -1663.42078, 14.15168, 0.00000, 0.00000, -1.20000);
- CreateObject(19370, 1354.44739, -1668.22412, 14.05156, 0.00000, 0.00000, -90.77999);
- CreateObject(19370, 1354.46790, -1663.14026, 14.05156, 0.00000, 0.00000, -90.77999);
- CreateObject(19370, 1356.71472, -1663.15613, 14.05156, 0.00000, 0.00000, -90.77999);
- CreateObject(19370, 1356.75903, -1668.25342, 14.05156, 0.00000, 0.00000, -91.26000);
- CreateObject(19370, 1358.27466, -1664.68274, 14.05156, 0.00000, 0.00000, -180.05994);
- CreateObject(1523, 1358.31006, -1666.65405, 12.60579, 0.00000, 0.00000, -89.70004);
- CreateObject(19370, 1358.28491, -1665.20593, 14.05156, 0.00000, 0.00000, -180.05994);
- CreateObject(2525, 1355.08582, -1664.11438, 12.59281, 0.00000, 0.00000, -89.81999);
- CreateObject(19370, 1355.68384, -1663.51428, 14.05156, 0.00000, 0.00000, -179.87996);
- CreateObject(2525, 1356.24744, -1664.15344, 12.59281, 0.00000, 0.00000, 90.66001);
- CreateObject(19370, 1355.68176, -1665.13403, 14.01786, 0.00000, 0.00000, -90.30001);
- CreateObject(2523, 1355.94922, -1667.65686, 12.64153, 0.00000, 0.00000, 180.17992);
- CreateObject(2523, 1355.24255, -1667.65479, 12.64153, 0.00000, 0.00000, 180.17992);
- CreateObject(2523, 1356.62012, -1667.68640, 12.64153, 0.00000, 0.00000, 180.17992);
- CreateObject(2741, 1354.91602, -1668.08069, 14.52495, 0.00000, 0.00000, 0.00000);
- CreateObject(2741, 1355.54224, -1668.06628, 14.52495, 0.00000, 0.00000, 0.00000);
- CreateObject(2741, 1356.16870, -1668.09680, 14.52495, 0.00000, 0.00000, 0.00000);
- CreateObject(1523, 1358.25659, -1665.16895, 12.60876, 0.00000, 0.00000, 178.68002);
- CreateObject(1523, 1352.93274, -1665.15906, 12.60876, 0.00000, 0.00000, -1.62001);
- CreateObject(19450, 1354.61035, -1663.42969, 15.82979, 0.96000, 89.88005, -0.48000);
- CreateObject(19450, 1356.66125, -1663.47192, 15.82979, 0.96000, 89.88005, -0.48000);
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- }
- else
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data Piss");
- INI_WriteInt(File,"PissLevel",0);
- INI_Close(File);
- PInfo[playerid][pPissLevel] = 0;
- }
- PissBar[playerid] = CreateProgressBar(585.00, 439.00, 52.50, 5.50, 869072810, 8);
- SetProgressBarValue(PissBar[playerid], PInfo[playerid][pPissLevel]);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- ShowProgressBarForPlayer(playerid, PissBar[playerid]);
- Text[playerid] = 0;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- KillTimer(PissTimer(playerid));
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data Piss");
- INI_WriteInt(File,"PissLevel",PInfo[playerid][pPissLevel]);
- INI_Close(File);
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (PRESSED(KEY_SECONDARY_ATTACK))
- {
- if(zonedrink(playerid))
- {
- SetTimerEx("Drink", 15000, false, "i", playerid);
- }
- }
- return 1;
- }
- CMD:pisssystem(playerid,params[])
- {
- ShowPlayerDialog(playerid,54352,0,"CREADIT And Command","Create By VinPure\n YLess For Y_ini\n ZCMD By Zeex\nProgress Bar By Toribio\nCMD:\n/pee\n/hand","Close","");
- return 1;
- }
- CMD:pee(playerid,params[])
- {
- if(PInfo[playerid][pPissLevel] != 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1357.2632,-1664.1940,13.6113))
- {
- Pissing[playerid] = 1;
- SendClientMessage(playerid,-3,"[PISSSYTEM]you urinate prescribed place and pay $ 5 fee");
- GivePlayerMoney(playerid,-5);
- TogglePlayerControllable(playerid, 0);
- SetPlayerSpecialAction(playerid, 68);
- SetPlayerDrunkLevel(playerid,0);
- GameTextForPlayer(playerid, "~w~Pee....", 5000, 1);
- SetTimerEx("PissFinish", 12000, false, "i", playerid);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 2.0,1354.0018,-1664.0780,13.6114))
- {
- Pissing[playerid] = 1;
- SendClientMessage(playerid,-3,"[PISSSYTEM]you urinate prescribed place and pay $ 5 fee");
- GivePlayerMoney(playerid,-5);
- SetPlayerDrunkLevel(playerid,0);
- TogglePlayerControllable(playerid, 0);
- SetPlayerSpecialAction(playerid, 68);
- GameTextForPlayer(playerid, "~w~Pee....", 5000, 1);
- SetTimerEx("PissFinish", 12000, false, "i", playerid);
- }
- else
- {
- Pissing[playerid] = 1;
- SendClientMessage(playerid,-3,"[PISSSYTEM]You urinating in the street and was fined $5000");
- GivePlayerMoney(playerid, -5000);
- SetPlayerDrunkLevel(playerid,0);
- TogglePlayerControllable(playerid, 0);
- SetPlayerSpecialAction(playerid, 68);
- GameTextForPlayer(playerid, "~w~Pee....", 5000, 1);
- SetTimerEx("PissFinish", 5000, false, "i", playerid);
- }
- }
- else
- {
- SendClientMessage(playerid, -1, "[PISSSYTEM]You do not want to urinate!");
- return 1;
- }
- return 1;
- }
- CMD:t(playerid,params[])
- {
- SetPlayerPos(playerid,1356.1147,-1667.2771,13.6090);
- return 1;
- }
- CMD:hand(playerid,params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0,1356.1147,-1667.2771,13.6090))
- {
- ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 1, 1, 1, 1, 1);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 2.0,1355.4749,-1667.2499,13.6091))
- {
- ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 1, 1, 1, 1, 1);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 2.0,1354.7985,-1667.2500,13.6091))
- {
- ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 1, 1, 1, 1, 1);
- }
- else
- {
- SendClientMessage(playerid,-1,"No In Zone");
- return 1;
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- Pissexit(playerid);
- return 1;
- }
- public Drink(playerid)
- {
- PInfo[playerid][pPissLevel] += 1;
- SetProgressBarValue(PissBar[playerid], PInfo[playerid][pPissLevel]);
- UpdateProgressBar(PissBar[playerid], playerid);
- return 1;
- }
- public PissFinish(playerid)
- {
- TextDrawHideForPlayer(playerid, PissNow);
- SetPlayerSpecialAction(playerid,0);
- PInfo[playerid][pPissLevel] = 0;
- SetProgressBarValue(PissBar[playerid],PInfo[playerid][pPissLevel]);
- UpdateProgressBar(PissBar[playerid], playerid);
- TogglePlayerControllable(playerid, 1);
- Pissing[playerid] = 0;
- SendClientMessage(playerid, -1, "[PISSSYTEM]You have finished urinating and now you have to feel comfortable!");
- return 1;
- }
- public PissTimer(playerid)
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PInfo[i][pPissLevel] == 8)
- {
- SendClientMessage(i, -1, "[PISSSYTEM]You Die For Not Go Piss!");
- SetPlayerHealth(playerid,0.0);
- Pissing[playerid] = 0;
- return 1;
- }
- if(PInfo[i][pPissLevel] == 7)
- {
- SendClientMessage(i, -1, "[PISSSYTEM]You're feeling the urge to urinate!");
- SendClientMessage(i,-1,"If You Not Piss ,,--> YOU DEAD");
- PInfo[i][pPissLevel] = 8;
- SetPlayerDrunkLevel(playerid,10000);
- SetTimerEx("PissUpdate",500, false, "i", playerid);
- SetProgressBarValue(PissBar[i], PInfo[i][pPissLevel]);
- UpdateProgressBar(PissBar[i], i);
- }
- else
- {
- PInfo[i][pPissLevel] += 1;
- SetProgressBarValue(PissBar[i], PInfo[i][pPissLevel]);
- UpdateProgressBar(PissBar[i], i);
- }
- }
- }
- return 1;
- }
- public PissUpdate(playerid)
- {
- if(Text[playerid] == 0)
- {
- if(PInfo[playerid][pPissLevel] >= 7)
- {
- if(Pissing[playerid] == 0)
- {
- TextDrawShowForPlayer(playerid, PissNow);
- Text[playerid] = 1;
- }
- }
- }
- else if(Text[playerid] == 1)
- {
- if(PInfo[playerid][pPissLevel] >= 7)
- {
- if(Pissing[playerid] == 0)
- {
- TextDrawHideForPlayer(playerid, PissNow);
- Text[playerid] = 0;
- }
- }
- }
- SetTimerEx("PissUpdate",500, false, "i", playerid);
- return 1;
- }
- //data
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("PissLevel",PInfo[playerid][pPissLevel]);
- return 1;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- stock zonedrink(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.0,2326.0071,-1645.9478,14.8270))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0,2060.1467,-1898.4554,13.5538))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0,1929.5487,-1772.4331,13.5469))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0,-16.1549,-90.8489,1003.5469))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0,-17.6376,-90.9706,1003.5469))
- {
- return 1;
- }
- return 0;
- }
- stock Pissexit(playerid)
- {
- PInfo[playerid][pPissLevel] = 0;
- SetPlayerDrunkLevel(playerid,0);
- TextDrawHideForPlayer(playerid, PissNow);
- PInfo[playerid][pPissLevel] = 0;
- SetProgressBarValue(PissBar[playerid], PInfo[playerid][pPissLevel]);
- UpdateProgressBar(PissBar[playerid], playerid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement