Posts: 1,648
Threads: 482
Joined: Jun 2010
Quick question, regarding random. I'm trying to make a random 3 gun parts in a gun package (Small Grip, Medium Grip, Large Grip), right? The player has to get 3, but ANY 3. How can I do that? Even if it's 2 of the same one?
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Just call random three times? What's the problem?
Posts: 1,648
Threads: 482
Joined: Jun 2010
I see, that is logical aha. How could I obtain the result from the Randoms? as in....How can I do something like
"You retrieved a (result), a (result) and a (result) from the package"
Posts: 1,648
Threads: 482
Joined: Jun 2010
Thanks, but I mean....
pawn Код:
new rand = Random(3);
if(rand == 1)
{
SmallGrip[playerid] ++;
}
if(rand == 2)
{
MedGrip[playerid] ++;
}
if(rand == 3)
{
LargeGrip[playerid] ++;
}
// from this it's only going to select 1, I need 3, but I need to know the result from it so I can put it in a string.
Posts: 1,648
Threads: 482
Joined: Jun 2010
Thank you so much, that's what I meant exactly. REP +