Poftim
CMD:roll(playerid, params[]) {
if(PlayerInfo[playerid][pRollPoints] < 100 return SCM(playerid), -1, "Nu ai 100 Roll Points!");
PlayerInfo[playerid][pRollPints] = 0;
Update(playerid, pRollPointsx);
new rand = random(30), string[64];
switch(rand) {
case 0..15: {
new amount = 100000 + random(400000);
format(string, sizeof(string), "Ai castigat $%s.", FormatNumber(amount));
SCM(playerid, COLOR_YELLOW, string);
GivePlayerCash(playerid, amount);
}
case 16..20: {
PlayerInfo[playerid][pLevel] ++;
Update(playerid, pLevelx);
format(string, sizeof(string), "Ai castigat 1x Level Up, acum ai level %d.", PlayerInfo[playerid][pLevel]);
SCM(playerid, COLOR_YELLOW, string);
}
case 21..30: {
new amount = 1 + random(5);
PlayerInfo[playerid][pExp] += amount;
Update(playerid, pRP);
format(string, sizeof(string), "Ai castigat %d RP-uri.", amount);
SCM(playerid, COLOR_YELLOW, string);
}
}
return 1;
}
EDIT: Pe langa comanda creeata, am mai facut asta la public PayDay
if(PlayerInfo[pRollPoints] < 100) PlayerInfo[pRollPoints] += 20, Update(i, pRollPointsx);
format(string, sizeof(string), "Roll Points %d/100", PlayerInfo[pRollPoints]); SCM(i, COLOR_YELLOW, string);