Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:buycrate(playerid, params[])
- {
- if(pInfo[playerid][pScore] < 3) return SCM(playerid, COLOR_INFO, "Eroare: Nu ai nivelul necesar pentru a folosi aceasta comanda.");
- if(pInfo[playerid][pDiamonds] < 12) return SCM(playerid, COLOR_INFO, "Eroare: Nu ai destule diamante.");
- if(!IsPlayerInRangeOfPoint(playerid, 15.0,155.6681,-1966.2190,3.5834)) return SCM(playerid, COLOR_INFO, "Eroare: Nu esti la locatia potrivita.");
- new sanse = random(33);
- switch(sanse)
- {
- case 0..10:// 10% sanse
- {
- GiveMoney(playerid, 510000);
- SCM(playerid, COLOR_INFO, "(( Crates: Ai castigat 510.000$ din (Legendary Crate). ))");
- }
- case 11..19:// 8% sanse
- {
- GiveMoney(playerid, 540000);
- SCM(playerid, COLOR_INFO, "(( Crates: Ai castigat 540.000$ din (Legendary Crate). ))");
- }
- case 20..26:// 6% sanse
- {
- GiveMoney(playerid, 600000);
- SCM(playerid, COLOR_INFO, "(( Crates: Ai castigat 600.000 din (Legendary Crate). ))");
- }
- case 27..30:// 3% sanse
- {
- pInfo[playerid][pScore] += 1, SetPlayerScore(playerid, pInfo[playerid][pScore]);
- SCM(playerid, COLOR_INFO, "(( Crates: Ai castigat un level 'UP' din (Legendary Crate). ))");
- }
- case 31..33:// 2% sanse
- {
- pInfo[playerid][pDiamonds] += 32;
- SCM(playerid, COLOR_INFO, "(( Crates: Ai primit [32 Diamonds] din (Legendary Crate). ))");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement