Guest User

Untitled

a guest
Feb 13th, 2021
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. case DIALOG_BUYCRATE:
  2. {
  3. if(!response) return 1;
  4. switch(listitem)
  5. {
  6. case 0:
  7. {
  8. pInfo[playerid][pDiamonds] -= 12);
  9. }
  10. case 1:
  11. {
  12. GiveMoney(playerid, -320000);
  13. }
  14. new sanse = random(33);
  15. switch(sanse)
  16. {
  17. case 0..10:// 10% sanse
  18. {
  19. GiveMoney(playerid, 510000);
  20. SCM(playerid, COLOR_INFO, "* Ai castigat 510.000$ din (Legendary Crate).");
  21. }
  22. case 11..19:// 8% sanse
  23. {
  24. GiveMoney(playerid, 540000);
  25. SCM(playerid, COLOR_INFO, "* Ai castigat 540.000$ din (Legendary Crate).");
  26. }
  27. case 20..26:// 6% sanse
  28. {
  29. GiveMoney(playerid, 600000);
  30. SCM(playerid, COLOR_INFO, "* Ai castigat 600.000 din (Legendary Crate).");
  31. }
  32. case 27..30:// 3% sanse
  33. {
  34. pInfo[playerid][pScore] += 1, SetPlayerScore(playerid, pInfo[playerid][pScore]);
  35. SCM(playerid, COLOR_INFO, "* Ai castigat un level 'UP' din (Legendary Crate).");
  36. }
  37. case 31..33:// 2% sanse
  38. {
  39. pInfo[playerid][pDiamonds] += 32;
  40. SCM(playerid, COLOR_INFO, "* Ai primit [32 Diamonds] din (Legendary Crate).");
  41. }
  42. }
  43. }
  44.  
  45.  
  46. CMD:buycrate(playerid, params[])
  47. {
  48. if(pInfo[playerid][pScore] < 3) return SCM(playerid, COLOR_INFO, "* Nu ai nivelul necesar pentru a folosi aceasta comanda.");
  49. if(pInfo[playerid][pDiamonds] < 12) return SCM(playerid, COLOR_INFO, "* Nu ai destule diamante.");
  50. if(pInfo[playerid][pMoney] < 320000) return SCM(playerid, COLOR_INFO, "* Nu ai destui bani.");
  51. if(!IsPlayerInRangeOfPoint(playerid, 15.0,155.6681,-1966.2190,3.5834)) return SCM(playerid, COLOR_INFO, "* Nu esti la locatia potrivita.");
  52. ShowPlayerDialog(playerid, DIALOG_BUYCRATE, DIALOG_STYLE_LIST, "CRATE", "12 Diamonds", "320.000$", "Ok", "Close");
  53. return 1;
  54. }
  55.  
  56.  
  57.  
  58.  
  59. C:\Users\andrei\Desktop\GM\gamemodes\GM.pwn(11521) : error 001: expected token: ";", but found ")"
  60. C:\Users\andrei\Desktop\GM\gamemodes\GM.pwn(11521) : error 029: invalid expression, assumed zero
  61. C:\Users\andrei\Desktop\GM\gamemodes\GM.pwn(11521) : warning 215: expression has no effect
  62. C:\Users\andrei\Desktop\GM\gamemodes\GM.pwn(11527) : error 002: only a single statement (or expression) can follow each "case"
  63. C:\Users\andrei\Desktop\GM\gamemodes\GM.pwn(11527) : error 017: undefined symbol "sanse"
  64. C:\Users\andrei\Desktop\GM\gamemodes\GM.pwn(11528) : error 017: undefined symbol "sanse"
  65. C:\Users\andrei\Desktop\GM\gamemodes\GM.pwn(29196) : warning 202: number of arguments does not match definition
  66. Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
  67.  
  68.  
  69. 5 Errors.
  70.  
Advertisement
Add Comment
Please, Sign In to add comment