31.05.2014, 23:56
because if [Owner] is empty strcmp returns 0 (match)
pawn Код:
stock GetPlayerVehicles(playerid)
{
new Nick[MAX_PLAYER_NAME], count = 0;
Nick = GetPlayerNameEx(playerid);
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(vInfo[i][Owner][0] != '\0' && strcmp(vInfo[i][Owner], Nick) == 0)
count++;
}
return count;
}