22.08.2018, 12:56
Hi guys,
I'm begin to work with iterator's,so I think that i'm doing something wrong.I use iterator for player's vehicle.(List of player's vehicles) I have problem with foreach.
OnPlayerDisconnect (There I destroy vehicles..)
Server_log: http://prntscr.com/klmj0d (So my server spam, i = 0 and i don't know why he don't want to get out from loop(Foreach).I think it spam when player don't have any vehicle.
For now,I'm do this:
It work's now.But i'm not sure do I need to check player vehicles before foreach loop?
I'm begin to work with iterator's,so I think that i'm doing something wrong.I use iterator for player's vehicle.(List of player's vehicles) I have problem with foreach.
Код:
new Iterator: Vehicles[MAX_PLAYERS]<MAX_CAR>;
Код:
foreach(new i: Vehicles[playerid]) { DestroyVehicle(VehicleInfo[i][vID]); printf("%d %d",i, playerid); }
For now,I'm do this:
Код:
new number = Iter_Count(Vehicles[playerid]); if(number > 0) { foreach...