MaRr Posted May 26, 2020 Share Posted May 26, 2020 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 More sharing options...
Gabi23 Posted May 27, 2020 Share Posted May 27, 2020 Folosești 3 timere diferite, nu unul global. Apoi, în loc de CrateTime pui NumeCrate. Link to comment Share on other sites More sharing options...
L0K3D Posted May 30, 2020 Share Posted May 30, 2020 Nu ai respectat modelul de postare. Server Query and RCON API | Actualizare script fara restart | Tips & Tricks Eureka v0.2 / Discord Eureka Link to comment Share on other sites More sharing options...
Recommended Posts