Jump to content

[HELP] Crate


MaRr
 Share

Recommended Posts

 Salutare! Cum pot face premiul la crate separat pentru 3 crate-uri, adica as vrea sa am premiu diferit la cele 3 crate-uri. Nu am nici-o idee cum pot face asta si de acea am nevoie de ajutor. 

if(CrateTime[i] > 0) {
                CrateTime[i] --;
                new amount, rand = random(28);
	            switch(rand) {
	            	case 0..7: {
	        		    amount = random(1) + 2;
                        format(string, sizeof(string), "~W~Crate~G~System~n~~n~~W~Step:~G~ %d /10~n~~W~Won:~G~ %d Premium Points", 10-CrateTime[i], FormatNumber(amount));
                        PlayerTextDrawSetString(i, CrateTD, string);
                        if(CrateTime[i] == 0)
                        {
					        static stringg[100];
					        PlayerInfo[i][pPremiumPoints] += amount, Update(i, pPremiumPoints);
						    PlayerTextDrawHide(i, CrateTD);
						    format(stringg,sizeof stringg,"You won %d premium points",amount);
						    SCM(i, COLOR_YELLOW,stringg);
					    }
					}
	        	    case 8..18: {
	        		    amount = random(1) + 3;
                        format(string, sizeof(string), "~W~Crate~G~System~n~~n~~W~Step:~G~ %d /10~n~~W~Won:~G~ %d Respect Points", 10-CrateTime[i], FormatNumber(amount));
                        PlayerTextDrawSetString(i, CrateTD, string);
                        if(CrateTime[i] == 0)
                        {
					        static stringg[100];
					        PlayerInfo[i][pExp] += amount, Update(i, pRP);
						    PlayerTextDrawHide(i, CrateTD);
						    format(stringg,sizeof stringg,"You won %d respect points",amount);
						    SCM(i, COLOR_YELLOW,stringg);
					    }
	                } 
                    case 19..28: {
                        amount = random(1000000) + 1200000;
                        format(string, sizeof(string), "~W~Crate~G~System~n~~n~~W~Step:~G~ %d /10~n~~W~Won:~G~ %d $", 10-CrateTime[i], FormatNumber(amount));
                        PlayerTextDrawSetString(i, CrateTD, string);
                        if(CrateTime[i] == 0)
					    {
					        static stringg[100];
						    GivePlayerCash(i, amount);
						    PlayerTextDrawHide(i, CrateTD);
						    format(stringg,sizeof stringg,"You won $%d",amount);
						    SCM(i, COLOR_YELLOW,stringg);
					        }
                        }       
                    }
                }

 

Link to comment
Share on other sites

  • L0K3D locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...