Simple question regarding class selection
#1

pawn Код:
for(new i = 1; i < 299; i++) {
     AddPlayerClass(i, 1931.1268,1345.1801,9.9688,267.2390, 0, 0, 0, 0, 0, 0);
}
How would I go about excluding the invalid skins from that loop? I've tried

pawn Код:
for(new i = 1; i < 299; i++) {
        if(i == 3)
            return i = 5;
        AddPlayerClass(i, 1931.1268,1345.1801,9.9688,267.2390, 0, 0, 0, 0, 0, 0);
     }
in an attempt to skip skin ID 3, and bring you right to ID 5, but it doesn't seem to work correctly.
Reply
#2

PHP код:
for(new 1299i++) 
{
     if(
!= && != && ... )
     
AddPlayerClass(i1931.1268,1345.1801,9.9688,267.2390000000);

Or

PHP код:
for(new 1299i++) 
{
     if(
== || == || ... ) continue;
     
AddPlayerClass(i1931.1268,1345.1801,9.9688,267.2390000000);

Reply
#3

pawn Код:
for(new i = 1; i > 3 && i < 4 && i < 299; i++) {

        AddPlayerClass(i, 1931.1268,1345.1801,9.9688,267.2390, 0, 0, 0, 0, 0, 0);

     }
Sorry didn't had time to test the code, but probably this is gonna work.
Reply
#4

pawn Код:
for(new i = 0; i < 299; i++)
    {
        switch(i)
        {
            case 3, 4, 5, 6, 7, 8, 42, 53, 64, 74, 86, 91, 149, 208, 273, 289:
            {
                continue;
            }
        }
        AddPlayerClass(i, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)