Help (Case random)
#2

I don't wanna dig into your code but I'll show you how to do what you want to do and you can simply implement it where you want.
pawn Код:
new chance = random(1); //can be 0, or 1
switch(chance)
{
    case 0:
    {
        //50% chance
    }
    case 1:
    {
        //50% chance
    }
}
or you could do something like this:
pawn Код:
new chance = random(3); //0, 1, 2, 3
switch(chance)
{
    case 0:
    {
        //25% chance
    }
    default:
    {
        //75% chance
    }
}
Reply


Messages In This Thread
Help (Case random) - by LuisPark - 04.06.2015, 03:37
Re: Help (Case random) - by Finn707 - 04.06.2015, 11:26

Forum Jump:


Users browsing this thread: 1 Guest(s)