This loop won't work, very strange.
#1

pawn Код:
new vehicleamount;
                    for(new v = 1; v <= MAX_VEHICLES; v++)
                    {
                        if(VehOwner[v] == PlayerSQLID[playerid])
                        {
                            vehicleamount++;
                            printf("VEH OWNER: %d", VehOwner[v]);
                            printf("PlayerSQLID %d", PlayerSQLID[playerid]);
                        }
                    }
                    if(vehicleamount >= PlayerLevel[playerid])return SendClientMessage(playerid, COLOUR_GREY, "You have the maximum amount of vehicles for your level.");

It won't display the results in the printfs either, very odd. Yes, I start vehicleids from 1, makes it tidier to see in database.
Reply
#2

pawn Код:
VehOwner[v] == PlayerSQLID[playerid]
Only explanation of this problem lies in this line. Are you sure that they equal each other? Try prinf'ing them before the if statement and see if they do.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)