22.11.2009, 19:00
I don't know what to use, which one is faster,
Example:
First code
Second code
Example:
First code
pawn Код:
new rand = random(100);
if(rand == 0) print("cat");
else if(rand == 1) print("dog");
else if(rand == 2) print("elephant"); // lol
...
pawn Код:
switch(random(100))
{
case 0: print("cat");
case 1: print("dog");
case 2: print("elephant");
}