27.01.2015, 19:48
You can use a switch like this to get a random number:
I know that, but how could you create a feature.
If i only want 1 and 3, i could probably do this:
But that would become very messy if you have alot of specific numbers like me.
pawn Код:
switch(random(3))
{
case 1: // Codes
case 2: // Codes
case 3: // Codes
}
If i only want 1 and 3, i could probably do this:
pawn Код:
switch(random(3))
{
case 1: // Codes
case 2:
{
switch(random(2))
{
case 1: // Codes from previous case 1
case 2: // Codes from previous case 3
}
}
case 3: // Codes
}