How else could I check this?
#1

pawn Код:
if(VehicleSlot1[playerid] == 0)
            {
                VehicleSlot1[playerid] = VehicleSQLID[vehicleid];

            }
            else if(VehicleSlot2[playerid] == 0)
            {
                VehicleSlot2[playerid] = VehicleSQLID[vehicleid];

            }
            else if(VehicleSlot3[playerid] == 0)
            {
                VehicleSlot3[playerid] = VehicleSQLID[vehicleid];
            }
Title says all.
Reply
#2

What is wrong with it? It looks fine to me, but you could make it shorter, e.g:

pawn Код:
if(VehicleSlot1[playerid] == 0) { VehicleSlot1[playerid] = VehicleSQLID[vehicleid]; }
else if(VehicleSlot2[playerid] == 0) { VehicleSlot2[playerid] = VehicleSQLID[vehicleid]; }
else if(VehicleSlot3[playerid] == 0) { VehicleSlot3[playerid] = VehicleSQLID[vehicleid]; }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)