Advertisement
Sem_Loreann

Untitled

Mar 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. case 2222:
  2. {
  3. if(!response) return true;
  4. {
  5. if(GetPVarInt(playerid,"Eda") > gettime()) return SendClientMessage(playerid, c_ARGON, "Пожалуйста, подождите. После предыдущего питания должно пройти 3 минуты.");
  6. if(PlayerInfo[playerid][pLevel] > 4)
  7. {
  8. if(GetMoney(playerid) < 60) return SendClientMessage(playerid, c_ORANGE, NotEnoughMoney);
  9. ClearAnimations(playerid);
  10. PlayerInfo[playerid][pThirsty] += 20.0;
  11. PlayerInfo[playerid][pHungry] += 20.0;
  12. SetPVarInt(playerid, "PLAYER_EAT", 1);
  13. SetPlayerAttachedObject(playerid, 2, 2880, 6);
  14. ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.0, 0, 0, 0, 0, 0);
  15. SetTimerEx("StopEat", 5300, false, "i", playerid);
  16. format(fstring, 74, "%s взял(а) с прилавка гамбургер с кофе, затем съел.", GetName(playerid));
  17. ProxDetector(playerid, 30.0, c_PURPLE, fstring);
  18. SetPVarInt(playerid,"Eda",gettime() + 180);
  19. }
  20. else
  21. {
  22. ClearAnimations(playerid);
  23. PlayerInfo[playerid][pThirsty] += 20.0;
  24. PlayerInfo[playerid][pHungry] += 20.0;
  25. SetPVarInt(playerid, "PLAYER_EAT", 1);
  26. SetPlayerAttachedObject(playerid, 2, 2880, 6);
  27. ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.0, 0, 0, 0, 0, 0);
  28. SetTimerEx("StopEat", 5300, false, "i", playerid);
  29. format(fstring, 74, "%s взял(а) с прилавка гамбургер с кофе, затем съел.", GetName(playerid));
  30. ProxDetector(playerid, 30.0, c_PURPLE, fstring);
  31. SetPVarInt(playerid,"Eda",gettime() + 180);
  32. }
  33. }
  34. return true;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement