Advertisement
Guest User

comanda

a guest
Nov 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. CMD:mananci(playerid, params[])
  2. {
  3. if(PinLogged[playerid] == 0)return SCM(playerid, COLOR_DARKNICERED,"{FFFFFF}{FFFFFF}Contul tau este {ff0000}blocat{ffffff}, foloseste {ff0000}/pin{ffffff} pentru a-l debloca..");
  4. if(IsPlayerConnected(playerid))
  5. {
  6. if(BizzInfo[InBussines[playerid]][bType] == 7 || BizzInfo[InBussines[playerid]][bType] == 9 || BizzInfo[InBussines[playerid]][bType] == 14 || HouseInfo[InHouse[playerid]][hHel] == 1)
  7. {
  8. new bid = InBussines[playerid],str[256];
  9. if(GetPlayerCash(playerid) < 100) return SCM(playerid,COLOR_GREY,"You don't have enough money.");
  10. new Float:health;
  11. GetPlayerHealthEx(playerid,health);
  12. if(health >= 75)
  13. {
  14. SetPlayerHealthEx(playerid, 100);
  15. ApplyAnimation(playerid,"FOOD","EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  16. GivePlayerCash(playerid, -100);
  17. GameTextForPlayer(playerid, "~r~-100$", 5000, 1);
  18. BizzInfo[bid][bTill] += 100;
  19. Update(playerid,pCashx);
  20. mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[bid][bTill],bid);
  21. mysql_tquery(SQL,str,"","");
  22. }
  23. else
  24. {
  25. SetPlayerHealthEx (playerid, health+25);
  26. ApplyAnimation(playerid,"FOOD","EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  27. GivePlayerCash(playerid, -100);
  28. GameTextForPlayer(playerid, "~r~-100$", 5000, 1);
  29. BizzInfo[bid][bTill] += 100;
  30. Update(playerid,pCashx);
  31. mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[bid][bTill],bid);
  32. mysql_tquery(SQL,str,"","");
  33. }
  34. if(HealTimer[playerid] != 0) return SendClientMessage(playerid, COLOR_LIGHTGREEN3, "You need to wait 30 seconds before using /heal again.");
  35. if(InHouse[playerid] > 0)
  36. {
  37. if(HouseInfo[InHouse[playerid]][hHel] == 1)
  38. {
  39. SetPlayerHealthEx(playerid, 100.0);
  40. GetPlayerName(playerid, sendername, sizeof(sendername));
  41. format(str, sizeof(str),"* %s ate some food.",sendername);
  42. ProxDetector(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  43. HealTimer[playerid] = 30;
  44. }
  45. else return SendClientMessage(playerid, COLOR_GREY, "This house don't have a food upgrade.");
  46. }
  47. }
  48. }
  49. }
  50. return 1;
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement