Advertisement
Guest User

/buycrate

a guest
Jul 12th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. YCMD:buycrate(playerid, params[], help)
  2. {
  3. new string[512];
  4.  
  5. if(IsPlayerInRangeOfPoint(playerid, 2.5, 3095.0518,2054.1155,8.1862)) {
  6. if(PlayerInfo[playerid][pPremiumPoints] < 10) return SCM(playerid, -1, "Nu ai suficiente Diamonds!");
  7. PlayerInfo[playerid][pPremiumPoints] -= 10;
  8. Update(playerid, pPremiumPointsx);
  9. SCMEx(playerid, -1, "Felicitari %s ti-ai cumparat un normal crate pentru suma de 10 Diamonds!",GetName(playerid));
  10. SCM(playerid, -1, "{76ff00}Poti folosi /opencrate pentru a deschide cutia normala.");
  11. format(string, sizeof(string), "%s si-a achizitionat un crate normal pentru 10 Diamonds.", GetName(playerid));
  12. InsertLog(playerid, string, LOG_SHOP);
  13. PlayerInfo[playerid][pCrates][0]++;
  14. save_crates(playerid);
  15. }
  16.  
  17. else if(IsPlayerInRangeOfPoint(playerid, 2.5, 3095.2227,2059.2869,8.1862)) {
  18. if(PlayerInfo[playerid][pPremiumPoints] < 15) return SCM(playerid, -1, "Nu ai suficiente Diamonds!");
  19. PlayerInfo[playerid][pPremiumPoints] -= 15;
  20. Update(playerid, pPremiumPointsx);
  21. SCMEx(playerid, -1, "Felicitari %s ti-ai cumparat un premium crate pentru suma de 15 Diamonds!",GetName(playerid));
  22. SCM(playerid, -1, "{76ff00}Poti folosi /opencrate pentru a deschide cutia premium.");
  23. format(string, sizeof(string), "%s si-a achizitionat un crate premium pentru 15 Diamonds.", GetName(playerid));
  24. InsertLog(playerid, string, LOG_SHOP);
  25. PlayerInfo[playerid][pCrates][1]++;
  26. save_crates(playerid);
  27. }
  28.  
  29. if(!IsPlayerInRangeOfPoint(playerid, 2.5, 3095.0518,2054.1155,8.1862)) return 1;
  30. else if(!IsPlayerInRangeOfPoint(playerid, 2.5, 3095.2227,2059.2869,8.1862)) return 1;
  31. return 1;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement