[FilterScript] System DriveThru + Hunger & Thirst
#11

I added a bit of command

-/food

Code:
Code:
CMD:food(playerid,params[])
{
   if(isnull(params))
   {
      SendClientMessage(playerid, COLOR_LIGHTRED, "Pakai: /food [burger/pizza/chicken]");
   }
   if(strcmp(params,"burger",true) == 0)
   {
      if(IsPlayerInRangeOfPoint(playerid, 20, 366.0248, -73.3478, 1001.5078))
      {
         if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | You don't have $500 to buy!");
	 	 if(GetPVarInt(playerid,"HUNGER") >= 100) return SendClientMessage(playerid, COLOR_RED,"| HUNGER | You are satisfied, don't need more food!");
		 GivePlayerMoney(playerid, -2500);
         GetPlayerHealth(playerid,life),SetPlayerHealth(playerid,life+75.0);
         SetPVarInt(playerid,"HUNGER",GetPVarInt(playerid,"HUNGER")+80);
         SetProgressBarValue(PGHUNGER, GetPVarInt(playerid,"HUNGER"));
         UpdateProgressBar(PGHUNGER,playerid);
         return SendClientMessage(playerid, COLOR_BLUE, "Thank you for purchasing Burger");
      }
      else return SendClientMessage(playerid, COLOR_BLUE, "You must be in Burger Shot for eat a Burger");
   }
   if(strcmp(params,"pizza",true) == 0)
   {
      if(IsPlayerInRangeOfPoint(playerid, 50, 372.3520, -131.6510, 1001.4922))
      {
         if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | You don't have $500 to buy!");
	 	 if(GetPVarInt(playerid,"HUNGER") >= 100) return SendClientMessage(playerid, COLOR_RED,"| HUNGER | You are satisfied, don't need more food!");
		 GivePlayerMoney(playerid, -2500);
         GetPlayerHealth(playerid,life),SetPlayerHealth(playerid,life+75.0);
         SetPVarInt(playerid,"HUNGER",GetPVarInt(playerid,"HUNGER")+80);
         SetProgressBarValue(PGHUNGER, GetPVarInt(playerid,"HUNGER"));
         UpdateProgressBar(PGHUNGER,playerid);
         return SendClientMessage(playerid, COLOR_BLUE, "Thank you for purchasing Pizza");
      }
      else return SendClientMessage(playerid, COLOR_BLUE, "You must be in Stacked Pizza untuk fot eat a Pizza");
   }
   if(strcmp(params,"chicken",true) == 0)
   {
      if(IsPlayerInRangeOfPoint(playerid, 50, 365.7158, -9.8873, 1001.8516))
      {
         if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | You don't have $500 to buy!");
	 	 if(GetPVarInt(playerid,"HUNGER") >= 100) return SendClientMessage(playerid, COLOR_RED,"| HUNGER | You are satisfied, don't need more food!");
		 GivePlayerMoney(playerid, -2500);
         GetPlayerHealth(playerid,life),SetPlayerHealth(playerid,life+75.0);
         SetPVarInt(playerid,"HUNGER",GetPVarInt(playerid,"HUNGER")+80);
         SetProgressBarValue(PGHUNGER, GetPVarInt(playerid,"HUNGER"));
         UpdateProgressBar(PGHUNGER,playerid);
         return SendClientMessage(playerid, COLOR_BLUE, "Thank you for purchasing Chicken");
      }
      else return SendClientMessage(playerid, COLOR_BLUE, "You Must Be in Chickenbell to food a chicken");
   }
   return 1;
}
Give Me REP please
Reply


Messages In This Thread
System DriveThru + Hunger & Thirst - by Learning - 17.02.2015, 00:55
Re: System DriveThru + Hunger & Thirst - by Eddye - 17.02.2015, 00:59
Re: System DriveThru + Hunger & Thirst - by JaydenJason - 17.02.2015, 16:20
Re: System DriveThru + Hunger & Thirst - by zT KiNgKoNg - 17.02.2015, 16:30
Re: System DriveThru + Hunger & Thirst - by Kaperstone - 17.02.2015, 16:34
Re: System DriveThru + Hunger & Thirst - by ZombieNest - 17.02.2015, 16:41
Re: System DriveThru + Hunger & Thirst - by wahyumahadir - 19.02.2015, 15:43
Re: System DriveThru + Hunger & Thirst - by Learning - 24.02.2015, 22:55
Re: System DriveThru + Hunger & Thirst - by Alex Magaсa - 24.02.2015, 23:00
Re: System DriveThru + Hunger & Thirst - by Learning - 24.02.2015, 23:04
Re: System DriveThru + Hunger & Thirst - by wahyumahadir - 25.02.2015, 19:08

Forum Jump:


Users browsing this thread: 4 Guest(s)