22.05.2015, 23:36
REMOVE THE LINE YOU ADDED: new a = 0, b = 102;
Now notice you didn't do anything in the "default;" therefore, you can remove that like so:
The reason you must use 312 is because there are 311 skin ID's. A loop starts at 0 and goes up to the point the statement is true. So, when it gets up to 312 it will stop running and not run the last (312 in this case because there isn't a skin ID 312). Lastly, you don't need two loops! That's the whole point of the switch.
Now notice you didn't do anything in the "default;" therefore, you can remove that like so:
pawn Код:
for (new a = 0; a < 312; a++) // You must use 312.
{
switch(a)
{
case 0..279, 289..299:
AddPlayerClass(a, 2485.6213,-1665.0665,15, -1, 0, 0, 0, 0, 0, 0);
case 280..288, 300..311:
AddPlayerClass(a, 21202, 212151, 21215, 15, -1, 0, 0, 0, 0 , 0, 0);
}
}