Advertisement
Guest User

Untitled

a guest
Feb 14th, 2021
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. CMD:buycrate(playerid, params[])
  2. {
  3. if(pInfo[playerid][pScore] < 3) return SCM(playerid, COLOR_INFO, "Eroare: Nu ai nivelul necesar pentru a folosi aceasta comanda.");
  4. if(pInfo[playerid][pDiamonds] < 12) return SCM(playerid, COLOR_INFO, "Eroare: Nu ai destule diamante.");
  5. if(!IsPlayerInRangeOfPoint(playerid, 15.0,155.6681,-1966.2190,3.5834)) return SCM(playerid, COLOR_INFO, "Eroare: Nu esti la locatia potrivita.");
  6. new sanse = random(33);
  7. switch(sanse)
  8. {
  9. case 0..10:// 10% sanse
  10. {
  11. GiveMoney(playerid, 510000);
  12. SCM(playerid, COLOR_INFO, "(( Crates: Ai castigat 510.000$ din (Legendary Crate). ))");
  13. }
  14. case 11..19:// 8% sanse
  15. {
  16. GiveMoney(playerid, 540000);
  17. SCM(playerid, COLOR_INFO, "(( Crates: Ai castigat 540.000$ din (Legendary Crate). ))");
  18. }
  19. case 20..26:// 6% sanse
  20. {
  21. GiveMoney(playerid, 600000);
  22. SCM(playerid, COLOR_INFO, "(( Crates: Ai castigat 600.000 din (Legendary Crate). ))");
  23. }
  24. case 27..30:// 3% sanse
  25. {
  26. pInfo[playerid][pScore] += 1, SetPlayerScore(playerid, pInfo[playerid][pScore]);
  27. SCM(playerid, COLOR_INFO, "(( Crates: Ai castigat un level 'UP' din (Legendary Crate). ))");
  28. }
  29. case 31..33:// 2% sanse
  30. {
  31. pInfo[playerid][pDiamonds] += 32;
  32. SCM(playerid, COLOR_INFO, "(( Crates: Ai primit [32 Diamonds] din (Legendary Crate). ))");
  33. }
  34. }
  35. return 1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement