Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define blue 0x00FFFFAA
- new need[MAX_PLAYERS];
- new Float:peehealth;
- new peeorshit[MAX_PLAYERS] = 1; //1 = Pee,2 = Shit
- forward needtimer(playerid); //Timer
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" ---Need For Pee : Most Wanted--- by Trooper");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- need[playerid] = 0;
- peeorshit[playerid] = 1;
- SetTimerEx("needtimer",1200000,0,"i",playerid); //1200000 = 20 Minuten
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/piss", cmdtext, true, 5) == 0 && need[playerid] >= 1 && peeorshit[playerid] > 1.5)
- {
- need[playerid] = 0;
- ApplyAnimation(playerid, "PAULNMAC", "Piss_in", 3.0, 0, 0, 0, 0, 0); // Pissing
- SendClientMessage(playerid,blue,"What a feeling...");
- return 1;
- }
- if (strcmp("/shit", cmdtext, true, 5) == 0 && need[playerid]>= 1 && peeorshit[playerid] <= 1.5)
- {
- if(PlayerToPoint(1.5,playerid,366.7872,-57.3001,1001.5101) || PlayerToPoint(1.5,playerid,371.0143,-57.3006,1001.5190))
- {
- need[playerid] = 0;
- ApplyAnimation(playerid, "PAULNMAC", "Piss_in", 3.0, 0, 0, 0, 0, 0); // Pissing
- SendClientMessage(playerid,blue,"What a feeling...");
- }
- else
- {
- SendClientMessage(playerid,blue,"You need to go on the Burgershot-toilet !");
- }
- return 1;
- }
- return 0;
- }
- public needtimer(playerid)
- {
- need[playerid] = need[playerid] + 1;
- if(need[playerid] == 2)
- {
- peeorshit[playerid] = random(2);
- if(peeorshit[playerid] <= 1.5)
- {
- SendClientMessage(playerid,blue,"You need to go for Big Boys");
- }
- else
- {
- SendClientMessage(playerid,blue,"You need to go for Little Tigers");
- }
- }
- if(need[playerid] == 4)
- {
- SendClientMessage(playerid,blue,"Your Trousers got wet....");
- GetPlayerHealth(playerid,peehealth);
- SetPlayerHealth(playerid,peehealth - 5);
- }
- if(need[playerid] == 6 && peeorshit[playerid] <= 1.5)
- {
- SendClientMessage(playerid,blue,"Your Ass busted");
- SetPlayerHealth(playerid,5);
- // need[playerid] = 0;
- }
- else if(need[playerid] == 6)
- {
- SendClientMessage(playerid,blue,"Your Pee busted");
- SetPlayerHealth(playerid,5);
- // need[playerid] = 0;
- }
- SetTimerEx("needtimer",1200000,0,"i",playerid); //1200000 = 20 Minuten
- return 1;
- }
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement