[REP+]why this random gives error? and how to fix it?
#8

you created a 2dimensional array, thats not needed for a linear ordered amount of values:
pawn Код:
new RandomMoney[]={
    5000,
    3900,
    8900,
    7600,
    6758,
    4589,
    3000
};
and then, the same as Dwane suggested: (now including the message ^^)
pawn Код:
new rnd=random(sizeof(RandomMoney));
GivePlayerMoney(playerid,RandomMoney[rnd]);
new string[128];
format(string,sizeof(string),"You earned $%d",RandomMoney[rnd]);
SendClientMessage(playerid,0x33aa33ff,string);
edit: lucky you, i posted between. just delete the double shit hehe
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)