Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task playerlndCrateTimer[500]()
- {
- foreach(new x : playerInCrate)
- {
- if(lndCrateTimer[x])
- {
- lndCrateTimer[x] --;
- new amount, playerid;
- if(lndCrateType[x] == 1) amount = random(50);
- else amount = random(80);
- switch(amount)
- {
- case 0..20:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "$20.000.000");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat $20.000.000");
- defer hidePlayerCrates(x);
- GivePlayerCash(playerid, 20000000);
- Update(playerid, pCashx);
- }
- }
- case 21..25:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "10 Premium Points");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat 10 Premium Points.");
- defer hidePlayerCrates(x);
- PlayerInfo[playerid][pPremiumPoints] += 10;
- Update(playerid, pPremiumPointsx);
- }
- }
- case 26..30:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "10.000 materials");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat 10.000 materials.");
- defer hidePlayerCrates(x);
- PlayerInfo[playerid][pMats] += 10000;
- Update(playerid, pMatsx);
- }
- }
- case 31..45:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "10 Rob Points");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat 10 Rob Points.");
- defer hidePlayerCrates(x);
- PlayerInfo[playerid][pRob] += 10;
- Update(playerid, pRobx);
- }
- }
- case 46..60:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "1 Hidden Color");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat 1 Hidden Color.");
- defer hidePlayerCrates(x);
- PlayerInfo[playerid][pHiddenColor] += 1;
- Update(playerid, pHiddenColorx);
- }
- }
- case 61..80:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "5 Respect Points");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat 5 Respect Points.");
- defer hidePlayerCrates(x);
- PlayerInfo[playerid][pExp] += 5;
- Update(playerid, pRP);
- }
- }
- }
- if(lndCrateType[x] == 2) amount = random(50);
- else amount = random(170);
- switch(amount)
- {
- case 90..110:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "$40.000.000");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat $40.000.000");
- defer hidePlayerCrates(x);
- GivePlayerCash(playerid, 40000000);
- Update(playerid, pCashx);
- }
- }
- case 111..125:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "30 Premium Points");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat 30 Premium Points.");
- defer hidePlayerCrates(x);
- PlayerInfo[playerid][pPremiumPoints] += 30;
- Update(playerid, pPremiumPointsx);
- }
- }
- case 126..139:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "20.000 materials");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat 20.000 materials.");
- defer hidePlayerCrates(x);
- PlayerInfo[playerid][pMats] += 20000;
- Update(playerid, pMatsx);
- }
- }
- case 140..148:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "20 Rob Points");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat 20 Rob Points.");
- defer hidePlayerCrates(x);
- PlayerInfo[playerid][pRob] += 20;
- Update(playerid, pRobx);
- }
- }
- case 149..155:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "2 Hidden Colors");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat 2 Hidden Colors.");
- defer hidePlayerCrates(x);
- PlayerInfo[playerid][pHiddenColor] += 2;
- Update(playerid, pHiddenColorx);
- }
- }
- case 156..171:
- {
- PlayerTextDrawSetString(x, lndCrates[3], "10 Respect Points");
- if(!lndCrateTimer[x])
- {
- SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat 10 Respect Points.");
- defer hidePlayerCrates(x);
- PlayerInfo[playerid][pExp] += 10;
- Update(playerid, pRP);
- }
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement