Random() question?
#6

pawn Код:
new rand[3];
new randStr[3][15];
new string[64];

for(new i = 0; i < sizeof rand; i++)
{
    rand[i] = random(3);
    switch(rand[i]) {
        case 0: {format(randStr[i], 15, "SmallGrip"); SmallGrip[playerid]++;}
        case 1: {format(randStr[i], 15, "MedGrip"); MedGrip[playerid]++;}
        case 2: {format(randStr[i], 15, "LargeGrip");LargeGrip[playerid]++;}
    }
}

format(string, sizeof(string),"You got a %s, a %s and a %s from the package.", randStr[0], randStr[1], randStr[2]);
SendClientMessage(playerid, -1, string);
Reply


Messages In This Thread
Random() question? - by Dokins - 11.08.2013, 18:19
Re: Random() question? - by Vince - 11.08.2013, 18:31
Re: Random() question? - by Dokins - 11.08.2013, 18:34
Re: Random() question? - by [XST]O_x - 11.08.2013, 18:38
Re: Random() question? - by Dokins - 11.08.2013, 18:43
Re: Random() question? - by [XST]O_x - 11.08.2013, 18:48
Re: Random() question? - by Dokins - 11.08.2013, 18:56
AW: Random() question? - by Nero_3D - 11.08.2013, 18:58

Forum Jump:


Users browsing this thread: 3 Guest(s)